|
-
Jun 19th, 2006, 12:55 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Not able to write to a text file
I am using following code. The file gets created but content of the file always empty. can some one correct my code?
StreamWriter fileWriter; // writes data to text file
FileStream output; // maintains connection to file
string fileName = @"c:\apsdata\br\junk.txt";
// open file with write access
output = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.Write);
// sets file to where data is written
fileWriter = new StreamWriter(output);
fileWriter.WriteLine(fileName);
thanks
nath
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|