To convert an enum type to an int type in C#, you can use type casting. You can simply assign the value of the enum type to a variable of type int. For example:
C# — How to cast int to enum (en)?
Добавить комментарий
To convert an enum type to an int type in C#, you can use type casting. You can simply assign the value of the enum type to a variable of type int. For example:
Для преобразования типа enum в тип int в C#, вы можете использовать приведение типов. Вы можете просто присвоить значение типа enum переменной типа int. Например:
Рассмотрим как преобразовать типа int в enum в C#, для различных версий .NET Framework и .NET Core.