因为short 可以隐式转换为int、long、float、double 或decimal;不需要文字修饰符。
考虑:
void method(int a) {}
void method2()
{
short a = 4;
method(a); // no problems
}
您可能会注意到 char 和 byte 也带有文字修饰符,可能出于同样的原因。
From To
sbyte short, int, long, float, double, or decimal
byte short, ushort, int, uint, long, ulong, float, double, or decimal
short int, long, float, double, or decimal
ushort int, uint, long, ulong, float, double, or decimal
int long, float, double, or decimal
uint long, ulong, float, double, or decimal
long float, double, or decimal
char ushort, int, uint, long, ulong, float, double, or decimal
float double
ulong float, double, or decimal