Casting ints to enums in C#

前端 未结 12 2136
北荒
北荒 2020-12-05 02:30

There is something that I cannot understand in C#. You can cast an out-of-range int into an enum and the compiler does not flinch. Imagine this

12条回答
提交回复
热议问题