Hello.I want to edit a txt file in c:\windows but I can't...I'm using this code:
StreamWriter sw = new StreamWriter(@"c:\windows\zamma\zamma.txt");
sw.Write(textBox3.Text);
sw.Close();
What's wrong whit my code? Thanks in advance....
(sorry for my Englisch...)
Loading

Sam HobbsPosted Nov 5, 2010, 10:43 PM
Something else to do is to use a try/catch block to catch errors. There might be an error happening that you don't see.
JurePosted Nov 5, 2010, 7:10 PM
Maybe your save button isn't programmed correctly? The code you posted is OK, that's why I ask.
Abdullah AKALINPosted Nov 5, 2010, 4:22 PM
Sam HobbsPosted Nov 5, 2010, 2:57 PM
Abdullah AKALINPosted Nov 5, 2010, 1:59 PM
Thank you for your reply.But there isn't an error message or anything like it.I press to F5 to run my program,and edit the text,then press to my"save"button.But nothing changes in the text file...I wish,I could explain my problem.
Sam HobbsPosted Oct 31, 2010, 6:44 PM
Abdullah AKALINPosted Oct 31, 2010, 10:16 AM
Tanmay SarkarPosted Oct 31, 2010, 2:45 AM
Thank you!