且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么枚举声明接受短暂而不是Int16的

更新时间:2022-11-29 17:16:16

的语法是正确的。 C#规范明确指出,枚举的基础类型必须是字节,为sbyte,总之,USHORT,INT,UINT,长或ulong的。

The syntax is correct. C# specification explicitly states that the enum's underlying type must be byte, sbyte, short, ushort, int, uint, long or ulong.

读什么微软表示,这个这里

Read what Microsoft says about this here.