Version Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents the version number of an assembly, operating system, or the common language runtime. This class cannot be inherited.
Inheritance Hierarchy
System. . :: . .Object
System..::..Version
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public NotInheritable Class Version
public sealed class Version
public ref class Version sealed
[<Sealed>]
type Version = class end
public final class Version
The Version type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Version(Int32, Int32) | Initializes a new instance of the Version class using the specified major and minor values. | |
Version(Int32, Int32, Int32, Int32) | Initializes a new instance of the Version class with the specified major, minor, build, and revision numbers. |
Top
Properties
Name | Description | |
---|---|---|
Build | Gets the value of the build component of the version number for the current Version object. | |
Major | Gets the value of the major component of the version number for the current Version object. | |
Minor | Gets the value of the minor component of the version number for the current Version object. | |
Revision | Gets the value of the revision component of the version number for the current Version object. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Returns a value indicating whether the current Version object is equal to a specified object. (Overrides Object. . :: . .Equals(Object).) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Converts the value of the current Version object to its equivalent String representation. (Overrides Object. . :: . .ToString() () () ().) |
Top
Remarks
Version numbers consist of two to four components: major, minor, build, and revision. The major and minor components are required; the build and revision components are optional, but the build component is required if the revision component is defined. All defined components must be integers greater than or equal to 0. The format of the version number is as follows (optional components are shown in square brackets ([ and ]):
major.minor[.build[.revision]]
The components are used by convention as follows:
Major: Assemblies with the same name but different major versions are not interchangeable. A higher version number might indicate a major rewrite of a product where backward compatibility cannot be assumed.
Minor: If the name and major version number on two assemblies are the same, but the minor version number is different, this indicates significant enhancement with the intention of backward compatibility. This higher minor version number might indicate a point release of a product or a fully backward-compatible new version of a product.
Build: A difference in build number represents a recompilation of the same source. Different build numbers might be used when the processor, platform, or compiler changes.
Revision: Assemblies with the same name, major, and minor version numbers but different revisions are intended to be fully interchangeable. A higher revision number might be used in a build that fixes a security hole in a previously released assembly.
Subsequent versions of an assembly that differ only by build or revision numbers are considered to be Hotfix updates of the prior version.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.