Class ValueEnum
An Enum that stores a value internally.
Inheritance
System.Object
ValueEnum
Implements
Namespace: EasyPost.Utilities.Internal
Assembly: EasyPost.dll
Syntax
public abstract class ValueEnum : Enum, IEnum
Constructors
| Improve this Doc View SourceValueEnum(Int32, Object)
Initializes a new instance of the ValueEnum class.
Declaration
protected ValueEnum(int id, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | id | The internal ID to associated with this enum. |
| System.Object | value | The internal value to associated with this enum. |
Methods
| Improve this Doc View SourceEquals(Nullable<Object>)
An Enum that stores a value internally.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<System.Object> | obj |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceFromValue<T>(Object)
Retrieve an ValueEnum of type T from a given value.
Declaration
public static T FromValue<T>(object value)
where T : ValueEnum
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | value | The value to retrieve the ValueEnum of. |
Returns
| Type | Description |
|---|---|
| T | An ValueEnum of type |
Type Parameters
| Name | Description |
|---|---|
| T | The type of ValueEnum to retrieve. |
GetHashCode()
An Enum that stores a value internally.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
Overrides
| Improve this Doc View SourceToString()
Retrieve a string representation of the EasyPost.Utilities.Internal.ValueEnum.Value of this Enum, or an empty string if a string representation is not available.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string representation of the EasyPost.Utilities.Internal.ValueEnum.Value of this Enum. |