mscorlib(4.0.0.0) API with additions
|
Represents the version number of an assembly, operating system, or the common language runtime. This class cannot be inherited. More...
Public Member Functions | |
Version (int major, int minor, int build, int revision) | |
Initializes a new instance of the T:System.Version class with the specified major, minor, build, and revision numbers. More... | |
Version (int major, int minor, int build) | |
Initializes a new instance of the T:System.Version class using the specified major, minor, and build values. More... | |
Version (int major, int minor) | |
Initializes a new instance of the T:System.Version class using the specified major and minor values. More... | |
Version (string version) | |
Initializes a new instance of the T:System.Version class using the specified string. More... | |
Version () | |
Initializes a new instance of the T:System.Version class. More... | |
object | Clone () |
Returns a new T:System.Version object whose value is the same as the current T:System.Version object. More... | |
int | CompareTo (object version) |
Compares the current T:System.Version object to a specified object and returns an indication of their relative values. More... | |
int | CompareTo (Version value) |
Compares the current T:System.Version object to a specified T:System.Version object and returns an indication of their relative values. More... | |
override bool | Equals (object obj) |
Returns a value indicating whether the current T:System.Version object is equal to a specified object. More... | |
bool | Equals (Version obj) |
Returns a value indicating whether the current T:System.Version object and a specified T:System.Version object represent the same value. More... | |
override int | GetHashCode () |
Returns a hash code for the current T:System.Version object. More... | |
override string | ToString () |
Converts the value of the current T:System.Version object to its equivalent T:System.String representation. More... | |
string | ToString (int fieldCount) |
Converts the value of the current T:System.Version object to its equivalent T:System.String representation. A specified count indicates the number of components to return. More... | |
![]() | |
bool | Equals (T other) |
Indicates whether the current object is equal to another object of the same type. More... | |
Static Public Member Functions | |
static Version | Parse (string input) |
Converts the string representation of a version number to an equivalent T:System.Version object. More... | |
static bool | TryParse (string input, out Version result) |
Tries to convert the string representation of a version number to an equivalent T:System.Version object, and returns a value that indicates whether the conversion succeeded. More... | |
static bool | operator== (Version v1, Version v2) |
Determines whether two specified T:System.Version objects are equal. More... | |
static bool | operator != (Version v1, Version v2) |
Determines whether two specified T:System.Version objects are not equal. More... | |
static bool | operator< (Version v1, Version v2) |
Determines whether the first specified T:System.Version object is less than the second specified T:System.Version object. More... | |
static bool | operator<= (Version v1, Version v2) |
Determines whether the first specified T:System.Version object is less than or equal to the second T:System.Version object. More... | |
static bool | operator > (Version v1, Version v2) |
Determines whether the first specified T:System.Version object is greater than the second specified T:System.Version object. More... | |
static bool | operator >= (Version v1, Version v2) |
Determines whether the first specified T:System.Version object is greater than or equal to the second specified T:System.Version object. More... | |
Properties | |
int | Major [get] |
Gets the value of the major component of the version number for the current T:System.Version object. More... | |
int | Minor [get] |
Gets the value of the minor component of the version number for the current T:System.Version object. More... | |
int | Build [get] |
Gets the value of the build component of the version number for the current T:System.Version object. More... | |
int | Revision [get] |
Gets the value of the revision component of the version number for the current T:System.Version object. More... | |
short | MajorRevision [get] |
Gets the high 16 bits of the revision number. More... | |
short | MinorRevision [get] |
Gets the low 16 bits of the revision number. More... | |
Represents the version number of an assembly, operating system, or the common language runtime. This class cannot be inherited.
Definition at line 11 of file Version.cs.
System.Version.Version | ( | int | major, |
int | minor, | ||
int | build, | ||
int | revision | ||
) |
Initializes a new instance of the T:System.Version class with the specified major, minor, build, and revision numbers.
major | The major version number. |
minor | The minor version number. |
build | The build number. |
revision | The revision number. |
T:System.ArgumentOutOfRangeException | major , minor , build , or revision is less than zero. |
Definition at line 179 of file Version.cs.
System.Version.Version | ( | int | major, |
int | minor, | ||
int | build | ||
) |
Initializes a new instance of the T:System.Version class using the specified major, minor, and build values.
major | The major version number. |
minor | The minor version number. |
build | The build number. |
T:System.ArgumentOutOfRangeException | major , minor , or build is less than zero. |
Definition at line 210 of file Version.cs.
System.Version.Version | ( | int | major, |
int | minor | ||
) |
Initializes a new instance of the T:System.Version class using the specified major and minor values.
major | The major version number. |
minor | The minor version number. |
T:System.ArgumentOutOfRangeException | major or minor is less than zero. |
Definition at line 235 of file Version.cs.
System.Version.Version | ( | string | version | ) |
Initializes a new instance of the T:System.Version class using the specified string.
version | A string containing the major, minor, build, and revision numbers, where each number is delimited with a period character ('.'). |
T:System.ArgumentException | version has fewer than two components or more than four components. |
T:System.ArgumentNullException | version is null . |
T:System.ArgumentOutOfRangeException | A major, minor, build, or revision component is less than zero. |
T:System.FormatException | At least one component of version does not parse to an integer. |
T:System.OverflowException | At least one component of version represents a number greater than F:System.Int32.MaxValue. |
Definition at line 259 of file Version.cs.
System.Version.Version | ( | ) |
Initializes a new instance of the T:System.Version class.
Definition at line 269 of file Version.cs.
object System.Version.Clone | ( | ) |
Returns a new T:System.Version object whose value is the same as the current T:System.Version object.
Implements System.ICloneable.
Definition at line 277 of file Version.cs.
int System.Version.CompareTo | ( | object | version | ) |
Compares the current T:System.Version object to a specified object and returns an indication of their relative values.
version | An object to compare, or null . |
null
. T:System.ArgumentException | version is not of type T:System.Version. |
Definition at line 293 of file Version.cs.
int System.Version.CompareTo | ( | Version | value | ) |
Compares the current T:System.Version object to a specified T:System.Version object and returns an indication of their relative values.
value | A T:System.Version object to compare to the current T:System.Version object, or null . |
null
.Definition at line 344 of file Version.cs.
override bool System.Version.Equals | ( | object | obj | ) |
Returns a value indicating whether the current T:System.Version object is equal to a specified object.
obj | An object to compare with the current T:System.Version object, or null . |
true
if the current T:System.Version object and obj are both T:System.Version objects, and every component of the current T:System.Version object matches the corresponding component of obj ; otherwise, false
.Definition at line 390 of file Version.cs.
bool System.Version.Equals | ( | Version | obj | ) |
Returns a value indicating whether the current T:System.Version object and a specified T:System.Version object represent the same value.
obj | A T:System.Version object to compare to the current T:System.Version object, or null . |
true
if every component of the current T:System.Version object matches the corresponding component of the obj parameter; otherwise, false
.Definition at line 409 of file Version.cs.
override int System.Version.GetHashCode | ( | ) |
Returns a hash code for the current T:System.Version object.
Definition at line 425 of file Version.cs.
Determines whether two specified T:System.Version objects are not equal.
v1 | The first T:System.Version object. |
v2 | The second T:System.Version object. |
true
if v1 does not equal v2 ; otherwise, false
.Definition at line 643 of file Version.cs.
Determines whether the first specified T:System.Version object is greater than the second specified T:System.Version object.
v1 | The first T:System.Version object. |
v2 | The second T:System.Version object. |
true
if v1 is greater than v2 ; otherwise, false
.Definition at line 688 of file Version.cs.
Determines whether the first specified T:System.Version object is greater than or equal to the second specified T:System.Version object.
v1 | The first T:System.Version object. |
v2 | The second T:System.Version object. |
true
if v1 is greater than or equal to v2 ; otherwise, false
.Definition at line 699 of file Version.cs.
Determines whether the first specified T:System.Version object is less than the second specified T:System.Version object.
v1 | The first T:System.Version object. |
v2 | The second T:System.Version object. |
true
if v1 is less than v2 ; otherwise, false
.T:System.ArgumentNullException | v1 is null . |
Definition at line 656 of file Version.cs.
Determines whether the first specified T:System.Version object is less than or equal to the second T:System.Version object.
v1 | The first T:System.Version object. |
v2 | The second T:System.Version object. |
true
if v1 is less than or equal to v2 ; otherwise, false
.T:System.ArgumentNullException | v1 is null . |
Definition at line 673 of file Version.cs.
Determines whether two specified T:System.Version objects are equal.
v1 | The first T:System.Version object. |
v2 | The second T:System.Version object. |
true
if v1 equals v2 ; otherwise, false
.Definition at line 632 of file Version.cs.
|
static |
Converts the string representation of a version number to an equivalent T:System.Version object.
input | A string that contains a version number to convert. |
T:System.ArgumentNullException | input is null . |
T:System.ArgumentException | input has fewer than two or more than four version components. |
T:System.ArgumentOutOfRangeException | At least one component in input is less than zero. |
T:System.FormatException | At least one component in input is not an integer. |
T:System.OverflowException | At least one component in input represents a number that is greater than F:System.Int32.MaxValue. |
Definition at line 531 of file Version.cs.
override string System.Version.ToString | ( | ) |
Converts the value of the current T:System.Version object to its equivalent T:System.String representation.
Definition at line 437 of file Version.cs.
string System.Version.ToString | ( | int | fieldCount | ) |
Converts the value of the current T:System.Version object to its equivalent T:System.String representation. A specified count indicates the number of components to return.
fieldCount | The number of components to return. The fieldCount ranges from 0 to 4. |
T:System.ArgumentException | fieldCount is less than 0, or more than 4.-or- fieldCount is more than the number of components defined in the current T:System.Version object. |
Definition at line 457 of file Version.cs.
|
static |
Tries to convert the string representation of a version number to an equivalent T:System.Version object, and returns a value that indicates whether the conversion succeeded.
input | A string that contains a version number to convert. |
result | When this method returns, contains the T:System.Version equivalent of the number that is contained in input , if the conversion succeeded, or a T:System.Version object whose major and minor version numbers are 0 if the conversion failed. If input is null or F:System.String.Empty, result is null when the method returns. |
true
if the input parameter was converted successfully; otherwise, false
.Definition at line 552 of file Version.cs.
|
get |
Gets the value of the build component of the version number for the current T:System.Version object.
Definition at line 127 of file Version.cs.
|
get |
Gets the value of the major component of the version number for the current T:System.Version object.
Definition at line 103 of file Version.cs.
|
get |
Gets the high 16 bits of the revision number.
Definition at line 151 of file Version.cs.
|
get |
Gets the value of the minor component of the version number for the current T:System.Version object.
Definition at line 115 of file Version.cs.
|
get |
Gets the low 16 bits of the revision number.
Definition at line 163 of file Version.cs.
|
get |
Gets the value of the revision component of the version number for the current T:System.Version object.
Definition at line 139 of file Version.cs.