This documentation is archived and is not being maintained.

MajorVersion Property (Reference Object)

Visual Studio .NET 2003

Returns the major version number of the reference. Read-only.

[Visual Basic .NET]
Public ReadOnly Property MajorVersion() As Integer
[Visual Basic 6]
Property Get MajorVersion() As Long
HRESULT __stdcall get_ MajorVersion(
   /* [out, retval] */ long* retVal
int MajorVersion {get;}
[JScript .NET]
public function get MajorVersion() : int

Return Value


The number returned depends on the reference type.

Reference TypeValue Returned
AssemblyMajor release number of the reference; 0 – 9999.
COMA long value.


The version of a reference is uniquely identified by four components: major, minor, build, and revision. The major and minor components are required. The revision component is optional when build is not defined. COM objects do not have revision and build components. For more information, see Assembly Versioning.


See the example in the Reference Object topic.

See Also

Applies To: Reference Object