Quote:
Originally Posted by Brumo
Yow, Thanks for the tutorial
I am working on some thing atm but i cant find out why thsi write my information twice in the same row
Code:
String AllData = (ID) + (";") + (Name) + (";") + (Date) + (";") + (Time)
StreamWriter sw = new StreamWriter(@"C:\TimeTable.csv", true);
string bufferOne = (AllData);
sw.Write(bufferOne);
sw.WriteLine(bufferOne);
sw.Close();
sw.Dispose();
It is returning the same information twice as i mentioned before but i dont know why because i use the variable only once in the writeline proces:s although i am appending the Timetable maybe that has to do with it something.
|
Because you tell it to.
sw.Write(bufferOne);
sw.WriteLine(bufferOne); writes it twice. Remove one of those and try it again.
Btw, Xav, I got my previous problem fixed. It turns out that the code I had before worked. I don't know what happened, maybe I didn't build, but it's fine now.