ComponentOptionType Class

An option type: a value of a type, or none.

public sealed class ComponentOptionType : ComponentValueType
Inheritance
ComponentValueType ComponentOptionType

Constructors

NameDescription
ComponentOptionType(ComponentValueType)Initializes a new instance of the ComponentOptionType class.

ComponentOptionType(ComponentValueType)

ComponentTypes.cs

Initializes a new instance of the ComponentOptionType class.

public ComponentOptionType(ComponentValueType type)

Parameters

type ComponentValueType
The type of the value.

Properties

NameDescription
TypeGets the type of the value.

Gets the type of the value.

public ComponentValueType Type { get; }

Property value

ComponentValueType

Methods

NameDescription
Equals(ComponentValueType?)Indicates whether the current object is equal to another object of the same type.
GetHashCode()Serves as the default hash function.

Equals(ComponentValueType?)

ComponentTypes.cs

Indicates whether the current object is equal to another object of the same type.

public override bool Equals(ComponentValueType? other)

Parameters

other ComponentValueType?
An object to compare with this object.

Returns

bool true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

ComponentTypes.cs

Serves as the default hash function.

public override int GetHashCode()

Returns

int A hash code for the current object.