- Home /
Question by
drok0920 · Jun 30, 2015 at 12:15 PM ·
writing to text
StreamWriter not writing?
I am using the below to write to a file.
StreamWriter sw = new StreamWriter (pathToLearnedData); sw.WriteLine(getImportantInString (lInput) + "=" + lOutput);
sw.Flush ();
sw.Close ();
sw.Dispose ();
and it works the first time(ie in another method its able to write just fine) but it seems that after i use sw.close in that before mentioned method it will update the file(i mean i have the file open in notepad++ at it asks to reload it but its still empty). And if it matters im calling the method from onClick.
Comment