Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Version info 1

Status
Not open for further replies.

erithracus

Programmer
Oct 31, 2002
12
0
0
NL
Hello all,

Is it possible to have the version info of an application which is found in AssemblyInfo.cs. printed on the screen. I.o.w. is it possible to retrieve Version info from AssemblyInfo.cs at runtime?

TIA

Jan
 
Yes, you use the LoadFrom method of the Assembly object:

ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemReflectionAssemblyClassLoadFromTopic.htm

Once you have an Assembly object, call the GetName method, which returns an AssemblyName object. This object has a Version property which returns a Version object. The Version object has major, minor, etc. properties.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top