Class ReleaseVersion
Namespace: Void.Minecraft
Assembly: Void.Minecraft.dll
public record ReleaseVersion : IComparable<ReleaseVersion>, IEquatable<ReleaseVersion>Inheritance
Implements
IComparable<ReleaseVersion>, IEquatable<ReleaseVersion>
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
ReleaseVersion(ushort, ushort, ushort)
public ReleaseVersion(ushort Major, ushort Minor, ushort Patch)Parameters
Major ushort
Minor ushort
Patch ushort
Properties
Major
public ushort Major { get; init; }Property Value
Minor
public ushort Minor { get; init; }Property Value
Patch
public ushort Patch { get; init; }Property Value
Methods
CompareTo(ReleaseVersion?)
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(ReleaseVersion? other)Parameters
other ReleaseVersion?
An object to compare with this instance.
Returns
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 other in the sort order. |
| Zero | This instance occurs in the same position in the sort order as other. |
| Greater than zero | This instance follows other in the sort order. |
Parse(string)
public static ReleaseVersion Parse(string versionString)Parameters
versionString string
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
A string that represents the current object.
TryParse(string, out ReleaseVersion)
public static bool TryParse(string versionString, out ReleaseVersion version)Parameters
versionString string
version ReleaseVersion
Returns
Operators
implicit operator ReleaseVersion(string)
public static implicit operator ReleaseVersion(string versionString)Parameters
versionString string
Returns
implicit operator string(ReleaseVersion)
public static implicit operator string(ReleaseVersion version)Parameters
version ReleaseVersion