This works, but I have two more questions:
1) Is there a way I can do this so it just gets one of the properties?
ie: just major, or minor version? Or just build instead of all four?
2) In ProjectBuilder for OS X, there's a variable that keeps track of
the build number for the project. Each time the program is compiled, the
build number is incremented by one. I was hoping to find something like
that in VS NET. Yet each time I build the program, the number stays the
same. Am I looking in the wrong place?
Thanks for the help! :)
AF
Ignacio Machin wrote:
Hi,
Try : Assembly.GetExecutingAssembly().GetName.Version , that return a
Version instance, this class implement these properties:
Public Properties
Build
Supported by the .NET Compact Framework.
Gets the value of the build component of the version number for this
instance.
Major
Supported by the .NET Compact Framework.
Gets the value of the major component of the version number for this
instance.
Minor
Supported by the .NET Compact Framework.
Gets the value of the minor component of the version number for this
instance.
Revision
Supported by the .NET Compact Framework.
Gets the value of the revision component of the version number for this
instance.
Hope this help,