integer to enum object in C# code example
Example 1: string to enum c# 3
StatusEnum MyStatus = (StatusEnum) Enum.Parse(typeof(StatusEnum), "Active", true);
Example 2: c# enum
enum Season
{
Spring,
Summer,
Autumn,
Winter
}
StatusEnum MyStatus = (StatusEnum) Enum.Parse(typeof(StatusEnum), "Active", true);
enum Season
{
Spring,
Summer,
Autumn,
Winter
}