Version Class

Specifies the version of the YAML language.

public class Version

Constructors

NameDescription
Version(int, int)Initializes a new instance of the Version class.

Version(int, int)

Version.cs

Initializes a new instance of the Version class.

public Version(int major, int minor)

Parameters

major int
The the major version number.
minor int
The the minor version number.

Properties

NameDescription
MajorGets the major version number.
MinorGets the minor version number.

Gets the major version number.

public int Major { get; }

Property value

int

Gets the minor version number.

public int Minor { get; }

Property value

int

Methods

NameDescription
Equals(object?)Determines whether the specified System.Object is equal to the current System.Object.
GetHashCode()Serves as a hash function for a particular type.

Equals(object?)

Version.cs

Determines whether the specified System.Object is equal to the current System.Object.

public override bool Equals(object? obj)

Parameters

obj object?
The System.Object to compare with the current System.Object.

Returns

bool true if the specified System.Object is equal to the current System.Object; otherwise, false.

GetHashCode()

Version.cs

Serves as a hash function for a particular type.

public override int GetHashCode()

Returns

int A hash code for the current Object.