C Sharp Value Types
Terms
- Bool
-
Size: 1 byte
Description: True or False
-
Byte
-
Size: 1 byte
Description: Unsigned (values 0-255)
- Char
-
Size: 2 bytes
Description: Unicode characters
- Decimal
-
Size: 16 bytes
Description:Fixed-precision up to 28 digits and the position of the decimal point. This is typically used in financial calculations. Requires the suffix "m" or "M."
- Double
-
Size: 8 bytes
Description:Double-precision floating point. Holds the values from approximately +/-5.0 * 10-324 to approximately +/-1.8 * 10308 with 15-16 significant figures.
- Float
-
Size: 4 bytes
Description:Floating-point number. Holds the values from approximately +/-1.5 * 10-45 to approximately +/-3.4 * 1038 with seven significant figures.
- Int
-
Size: 4 bytes
Description:
Signed integer values between -2,147,483,648 and 2,147,483,647
- Long
-
Size: 8 bytes
Description:Signed integers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
-
Name the 13 built in value types in C Sharp.
- byte, char, bool, sbyte, short, ushort, int, uint, float, double, decimal, long, ulong
- SByte
-
Size: 1 byte
Description: Signed (values -128 to 127)
- Short
-
Size: 2 bytes
Description: Signed (short) (values -32,768 to 32,767) - UInt
-
Size: 4 bytes
Description:
Unsigned integer values between 0 and 4,294,967,295
- ULong
-
Size: 8 bytes
Description:Unsigned integers ranging from 0 to 0xffffffffffffffff
- UShort
-
Size: 2 bytes
Description: Unsigned (short) (values 0 to 65,535)