ComponentVariantType Class
A variant type: one of several named cases, each with an optional payload.
public sealed class ComponentVariantType : ComponentValueType- Inheritance
ComponentValueTypeComponentVariantType
Constructors
| Name | Description |
|---|---|
| ComponentVariantType(IEnumerable<ComponentCase>) | Initializes a new instance of the ComponentVariantType class. |
ComponentVariantType(IEnumerable<ComponentCase>)
ComponentTypes.csInitializes a new instance of the ComponentVariantType class.
public ComponentVariantType(IEnumerable<ComponentCase> cases)Parameters
casesIEnumerable<ComponentCase>- The cases, at least one.
Properties
| Name | Description |
|---|---|
| Cases | Gets the cases. |
Cases
ComponentTypes.csMethods
| Name | Description |
|---|---|
| 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.csIndicates whether the current object is equal to another object of the same type.
public override bool Equals(ComponentValueType? other)Parameters
otherComponentValueType?- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.