|
Subject:
|
how to generate a text file using .NET?
|
|
Posted By:
|
pooh2323
|
Post Date:
|
2/9/2004 11:17:43 AM
|
I am trying to use .NET to generate a text file, in which today's date will be displayed. Anyone know how to do it?
I know that some older compilers like VB or CC can do it, I don't have them installed on my computer. So I am seeing if .NET can do it.
Thanks!
|
|
Reply By:
|
planoie
|
Reply Date:
|
2/9/2004 11:43:53 AM
|
System.IO.StreamWriter objFile = System.IO.File.CreateText("<path to file>"); objFile.Write(System.DateTime.Now.ToString); objFile.Close();
Peter ------------------------------------------------------ Work smarter, not harder.
|
|
Reply By:
|
pooh2323
|
Reply Date:
|
2/11/2004 10:30:02 AM
|
Thank you!
|