Thursday, October 9, 2008

C#: How to get version information for a file

.NET 1.1 provides System.Diagnostics.FileVersionInfo to do this.

****************************************************************
FileVersionInfo myFI = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");

return myFI.FileVersion;

****************************************************************

No comments: