Home > Net >  C # file STREAM of questions
C # file STREAM of questions

Time:10-19

Consult everybody, in c #
StreamWriter sw1=new StreamWriter (" D: \ \ 345. TXT ", false);//covered in the
//to create file written content
Sw1. WriteLine (textBox3. Text);
Sw1. WriteLine (textBox3. Text);
//close the current file stream
//sw1. Flush ();
Sw1. Close ();
Sw1. The dispose ();
Some people say that FLUSH must, otherwise cause data loss, but I use is very normal, written to the file, can't appear, I lost this don't need to FLUSH really need?
And have a close, don't need to DISPOSE really need?
  •  Tags:  
  • C#
  • Related