Showing posts with label Version. Show all posts
Showing posts with label Version. Show all posts

Monday, December 1, 2008

ASP.NET 1.1: How to get Assembly version

In ASP.NET 1.1, we can use the code below to return a System.Version object.

"System.Reflection.Assembly.GetExecutingAssembly().GetName().Version"

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;

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