Skip to content

Class ReleaseVersion

Namespace: Void.Minecraft
Assembly: Void.Minecraft.dll

public record ReleaseVersion : IComparable<ReleaseVersion>, IEquatable<ReleaseVersion>

Inheritance

objectReleaseVersion

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

ushort

Minor

public ushort Minor { get; init; }

Property Value

ushort

Patch

public ushort Patch { get; init; }

Property Value

ushort

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

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 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

ReleaseVersion

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 ReleaseVersion)

public static bool TryParse(string versionString, out ReleaseVersion version)

Parameters

versionString string

version ReleaseVersion

Returns

bool

Operators

implicit operator ReleaseVersion(string)

public static implicit operator ReleaseVersion(string versionString)

Parameters

versionString string

Returns

ReleaseVersion

implicit operator string(ReleaseVersion)

public static implicit operator string(ReleaseVersion version)

Parameters

version ReleaseVersion

Returns

string