Class EnumWrapper<TEnum, TWrapper>
Used to implement IEquatable<T> for an enum.
Implements
IEquatable<TWrapper>
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Samples.EnumBased
Assembly: BotBrain.Samples.dll
Syntax
public class EnumWrapper<TEnum, TWrapper> : IEquatable<TWrapper> where TEnum : Enum where TWrapper : EnumWrapper<TEnum, TWrapper>
Type Parameters
Name | Description |
---|---|
TEnum | The enum type. |
TWrapper | The wrapper type. |
Remarks
Initializes a new instance of the EnumWrapper<TEnum, TWrapper> class.
Constructors
View SourceEnumWrapper(TEnum)
Used to implement IEquatable<T> for an enum.
Declaration
public EnumWrapper(TEnum value)
Parameters
Type | Name | Description |
---|---|---|
TEnum | value | The enum value. |
Remarks
Initializes a new instance of the EnumWrapper<TEnum, TWrapper> class.
Properties
View SourceValue
Gets the enum value.
Declaration
public TEnum Value { get; }
Property Value
Type | Description |
---|---|
TEnum |
Methods
View SourceEquals(TWrapper?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(TWrapper? other)
Parameters
Type | Name | Description |
---|---|---|
TWrapper | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |