About This eBook by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Integral Types

Integral types are one category of built-in value types. They have an integral numeric value represented by a number of bits (not surprisingly in powers of two) and can either be signed or unsigned.

The u prefix is typically used as a prefix in the C# reserved word for those types to denote unsigned integral types. A notable exception is byte, which is unsigned, where an s prefix is used to indicate the signed variant. This aligns with what developers spontaneously think of when you say “byte” (range 0x00 to 0xFF to say it in hex). And the English pronunciation of “ubyte” didn’t sound too appealing either! Table 4.1 summarizes the integral types with their C# and BCL names, along with their ranges.

TABLE 4.1 Integral Types

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required