DEV Community

C# {Integral Types}

- C# integral types encompass byte, sbyte, short, ushort, int, uint, long, and ulong, each with varying bit sizes and signed/unsigned characteristics. - Byte represents an 8-bit unsigned integer ranging from 0 to 255. - Sbyte represents an 8-bit signed integer ranging from -128 to 127. - Short represents a 16-bit signed integer ranging from -32,768 to 32,767. - Ushort represents a 16-bit unsigned integer ranging from 0 to 65,535. - Int represents a 32-bit signed integer ranging from -2,147,483,648 to 2,147,483,647. - Uint represents a 32-bit unsigned integer ranging from 0 to 4,294,967,295. - Long represents a 64-bit signed integer ranging from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. - Ulong represents a 64-bit unsigned integer ranging from 0 to 18,446,744,073,709,551,615. - Each integral type is used for specific purposes, considering factors like range, memory usage, and computational efficiency.
favicon
dev.to
dev.to
Create attached notes ...