use the System.IO namespace and use the FileInfo class to get the information you want. Give the FileInfo the path and filename of your assembly/program
use the LastWriteTime property to get the last modified time I believe.
Example:
FileInfo theFileInfo = new FileInfo("path\myProgram.exe");
Get the LastModified date of the application
Netmaster0000
absolutely :-)
you can try this:
FileVersionInfo theVersionInfo = FileVersionInfo.GetVersionInfo(Application.ExecutablePath);
MessageBox.Show(theVersionInfo.FileMajorPart.ToString() + "." + theVersionInfo.FileMinorPart.ToString());
Eric-NZ
System.Reflection.Assembly.GetExecutingAssembly().GetName().
Version.ToString();
Works pretty well.
Mortsdeh
absolutely.
use the System.IO namespace and use the FileInfo class to get the information you want. Give the FileInfo the path and filename of your assembly/program
use the LastWriteTime property to get the last modified time I believe.
Example:
FileInfo theFileInfo = new FileInfo("path\myProgram.exe");
MessageBox.Show(theFileInfo.LastWriteTime.ToString());
http://msdn2.microsoft.com/en-us/library/system.io.fileinfo.aspx
http://msdn2.microsoft.com/en-us/library/system.io.fileinfo_properties.aspx
http://msdn2.microsoft.com/en-us/library/system.io.fileinfo_properties.aspx
does this help
Bhupendra_Singh_4c7760
yes! :-) That will be another one also, I remembered using that but forgot about it completely.
MuscleHead
In a similar vein, is it at all possible to get the AssemblyVersion number of the running application