c# convert int enum to string code example
Example 1: string to enum c#
Enum.TryParse("Active", out StatusEnum myStatus);
Example 2: convert int to enum c#
YourEnum foo = (YourEnum)yourInt;
Enum.TryParse("Active", out StatusEnum myStatus);
YourEnum foo = (YourEnum)yourInt;