C# .net core convert int to enum
if (Enum.IsDefined(typeof(YourEnum), yourInt))
{
return (YourEnum) yourInt;
}
OR:
if (Enum.IsDefined(typeof(YourEnum), yourInt))
{
return (YourEnum) Enum.ToObject(typeof(YourEnum), yourInt);
}
Also in C#:
- see if two string arrays are equal c#
- csharp check if env is development
- .net core identity get user id
- validating file upload asp.net core mvc
- unity get child
- double tryparse dot comma
- how to make a datatable in c#
- c# console delay
- load information with txt file to uwp c#
- C# webclient submit form
- c# how to run external program
- unity 2d horizontal movement help
- get all child gameObject of gameObject C#
- how to put double quotes in a string c#
- c# datetime dd/mm/yyy hh:mm:ss
- convert array to list Unity C#
- unity particle system color
- ignore fakeiteasy
- transform.Translate movement
- load scene unity
- devexpress objectspace to session
- How to execute script in C#
- escape double quotes c#
- resize image c#