By default, C# enums are stored as integers. I'd like to make it a short instead. Is there a way to do this?
sure, this can be done, but it has to be an integral type ( byte, short, int, etc.) except char...
enum myEnum : short
{
FirstValue = 0,
};
here is the MSDN docs
Like this:
enum MyEnum : short
{
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With