Answers for "how int convert to enum in c#"

C#
1

c# convert string to enum value

using System;

Enum.tryParse("input", out EnumName myEnum);
Posted by: Guest on May-25-2021
0

cast int to enum type c#

YourEnum foo = (YourEnum)Enum.ToObject(typeof(YourEnum) , yourInt);
Posted by: Guest on August-20-2021

C# Answers by Framework

Browse Popular Code Answers by Language