ToEnum<TEnumType>()
Converts the integer representation to its corresponding enumeration.
public static TEnumType ToEnum<TEnumType>(this int value)
private enum Level
{
Low = 0,
Medium = 15,
High = 30,
}
0.ToEnum<Level>();
30.ToEnum<Level>();
123.ToEnum<Level>();
Level.Low
Level.High
Level.Low
Last updated