Class SemVersion
public sealed record SemVersion : IComparable<SemVersion>, IEquatable<SemVersion>
- Inheritance
-
SemVersion
- Implements
- Inherited Members
Constructors
SemVersion(int, int, int)
public SemVersion(int Major, int Minor, int Patch)
Parameters
Properties
Major
public int Major { get; init; }
Property Value
Minor
public int Minor { get; init; }
Property Value
One
public static SemVersion One { get; }
Property Value
Patch
public int Patch { get; init; }
Property Value
Methods
CompareTo(SemVersion?)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(SemVersion? other)
Parameters
otherSemVersionAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin the sort order.
Parse(string)
public static SemVersion Parse(string text)
Parameters
textstring
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
TryParse(string, out SemVersion)
public static bool TryParse(string text, out SemVersion version)
Parameters
textstringversionSemVersion