In vb you can do this to get the time stamp of a file
// get a time stamp of file
filedate = FileDateTime(a_filename);
Anyone know how do I get the same kind of thing
in c#? Is there another system thing I have to include
also?
Many thanks folks
Printable View
In vb you can do this to get the time stamp of a file
// get a time stamp of file
filedate = FileDateTime(a_filename);
Anyone know how do I get the same kind of thing
in c#? Is there another system thing I have to include
also?
Many thanks folks
Either one of them, whatever suits you best! There are a lot more and powerfull things you can do with File and Directory Classes, you should have a closer look at them, if you are working with files.Code:using System.IO;
.
.
.
MessageBox.Show(File.GetCreationTime(Application.StartupPath + @"\test.xml").ToString());
MessageBox.Show(File.GetCreationTimeUtc(Application.StartupPath + @"\test.xml").ToString());
Hope That Helps,
Stephan