究竟都是整数类型?都是、整数、类型

2023-09-03 03:14:30 作者:太酷不给撩

在研究了开关文档和发现它可以只有开关在的整型的我开始寻找一个定义。我不能找到一个任何地方。我只能找整型的列表。

Having studied the switch documentation and discovering it can only switch on integral types I set about looking for a definition. I can't find one anywhere. I can only find a list of integral types.

我可以采取一个猜测整数类型有哪些都融入了语言的种类,但是,我会更开心了正确的定义。有没有人有一个?

I could take a guess that integral types are the types which are integrated into the language, however I'd be happier with a proper definition. Does anyone have one?

推荐答案

积分指的整数的类型(即整数)。在C#中,这意味着类型,如 INT 等等。

"Integral" refers to integer types (i.e. whole numbers). In C# this means types like int, long, short, etc.

请参阅积分类型表(C#参考)

下表显示的积分类型的长度和范围,构成简单类型的一个子集

The following table shows the sizes and ranges of the integral types, which constitute a subset of simple types.

编辑:请注意,开关语句支持文字字符串,以及

Keep in mind that the switch statement supports literal strings as well.