beginner in C# needs help
-
i have a .txt file that i have data in there that is seperated using comma and i want to read from this text file and collect all of the data from the text file for example ::::::::::::::::::::::::::: 12/4/2005,pin 23/4/2006,unpin i want to be able to read something like that and get all of the informations seperately so i kno that for the first line i have 12/4/2005 and pin differently and liewise for the other line ? can someone prob point me out to a tutorial that can show me how to do this or possibly show me a snippet of code to do this............ and in general i wold appreciate any links to tutorial for c# also __________________ kenny
-
i have a .txt file that i have data in there that is seperated using comma and i want to read from this text file and collect all of the data from the text file for example ::::::::::::::::::::::::::: 12/4/2005,pin 23/4/2006,unpin i want to be able to read something like that and get all of the informations seperately so i kno that for the first line i have 12/4/2005 and pin differently and liewise for the other line ? can someone prob point me out to a tutorial that can show me how to do this or possibly show me a snippet of code to do this............ and in general i wold appreciate any links to tutorial for c# also __________________ kenny
-
Search "Reading a text file in C#" in google. Once you have a line of text from the file you can use
string.Spilt(',');
to seperate the info. Something like:string currentText; // text obtained from file string [] seperated = currentText.Split(',');
Thanks Sean89 i tried the snippet of code u gave me and i was able to sperate this sample text string i put in my code just to check :::: string cfvText="kenny,edmond,walker" ; ::::::: so i am goign to try and find a tutorial as u say that will assist me to read from a file in c# now, thanks again kenny
-
Thanks Sean89 i tried the snippet of code u gave me and i was able to sperate this sample text string i put in my code just to check :::: string cfvText="kenny,edmond,walker" ; ::::::: so i am goign to try and find a tutorial as u say that will assist me to read from a file in c# now, thanks again kenny