App.Major, App.Minor, App.Revision in .Net

W

W1ld0ne [MCSD]

In vb 6 objects you could build a .Version method that returned the version
of your object using the App.Major & "." & app.Minor & "." & App.Revision
method.

How do you do this in .Net?

Thanks
David
 
T

Thomas

Application.ProductVersion contains the full version as defined by
AssemblyInfo.vb
 
A

Armin Zingler

W1ld0ne said:
In vb 6 objects you could build a .Version method that returned the
version of your object using the App.Major & "." & app.Minor & "." &
App.Revision method.

How do you do this in .Net?

<F1>
Visual Studio.NET
Visual Basic and Visual C#
Upgrading applications
Upgrading from VB 6.0
Introduction in vB.Net for experienced VB users
Changes in Forms in VB.NET
Changes in Controls in VB.NET
Changes in the App object

(see hints in signature)
 
W

W1ld0ne [MCSD]

Thomas, thanks dude, this works great in Windows Applications, but not in
Class modules....

Anyone have any clues?

Thanks
David
 
W

W1ld0ne [MCSD]

Found the answer thanks to Armin:

Public ReadOnly Property Version() As String

Get

Return
(System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembl
y.GetExecutingAssembly.Location).FileVersion)

End Get

End Property
 
A

Armin Zingler

W1ld0ne said:
Thomas, thanks dude, this works great in Windows Applications, but
not in Class modules....

What if the class module is in a Windows applicaton? ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top