In vb6, I could use "App" for displaying the Assembly version number, ie
VB Code:
Me.Caption = Me.Caption & " [V" & App.Major & "." & App.Minor & "." & App.Revision & "]"
Is there a similar way of doing it in .Net? I notice there is a system.version class - but have so far only found it used in the system.Environment namespace (and it isn't the assembly version number).
There best I have found so far is.
VB Code:
Private Function GetAssemblyVersion() As String '* Get the Assembly Version of current object * Dim strElements() As String Dim strName As String strName = System.Reflection.GetExecutingAssembly.FullName() strElements = strName.Split(CType(",", Char)) Return strElements(1) End Function
But I kind of expected it to be more readably available...




Reply With Quote