Can anybody show me how to get my programs version number (that i set in the assembly) at runtime? i want to display it in a label for users to see :P
Can anybody show me how to get my programs version number (that i set in the assembly) at runtime? i want to display it in a label for users to see :P
System.Windows.Forms.Application.ProductVersion. ;)
thank u.. was looking in assembly :P
That won't work with a dll though. You can use this for Dll's and Exe's:
VB Code:
'Create the assembly object Dim objAssembly As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly() 'Get each part of the version through the assembly object Return objAssembly.GetName().Version.Major & "." & objAssembly.GetName().Version.Minor & "." & _ objAssembly.GetName().Version.Build & "." & objAssembly.GetName().Version.Revision