create an empty .txt file in c#

September 6, 2011 at 04:04:42
Specs: Windows 7
Hi how can i create an empty .txt file in c:\ directory using c#
i have the following code that generate the file name
Filname = "Myfilename" + i.ToString() + ".txt";

Thank you for your help

See More: create an empty .txt file in c#

Report •


#1
September 19, 2011 at 05:53:29
Try this File.Create("test.txt") or File.Create(Filname);

Report •
Related Solutions


Ask Question