Method TryGetName
TryGetName<T>(T, out string?)
Gets the first enumeration name with the given value.
Declaration
public static bool TryGetName<T>(this T value, out string? name) where T : unmanaged, Enum
Parameters
Type | Name | Description |
---|---|---|
T | value | The enumeration value. |
string | name | Contains the matched name when the method returns if the name was found, otherwise null. |
Returns
Type | Description |
---|---|
bool |
Type Parameters
Name | Description |
---|---|
T |