Windows Phone Developers

Wednesday, September 17, 2008

Write Text Files using C#

C# Write Text Files / Write ASCII Files using C#

private void write_to_textfile()

{

try

{

StreamWriter SW = new StreamWriter(@"c:\vbadud\Sample.txt");

SW.Write ("This is a sample text");

SW.Flush() ;

SW.Close();

}

catch(Exception ex)

{

MessageBox.Show("Error writing file := " + ex.Message );

}

}

See Also:

Combining Text Files using VBA

Spacing in Text Files

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

No comments:

Post a Comment