An Interest In:
Web News this Week
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
- March 13, 2024
- March 12, 2024
- March 11, 2024
Built-in Types in C
bool
- is the result type of comparison and equality operators.
byte
- is an immutable value type that represents unsigned integers with values that range from 0 to 255.
sbyte
- Sbyte Struct represents an 8-bit signed integer. The SByte value type represents integers with values ranging from -128 to +127.
char
- is a value type that represents one character in a string
. The C#
char or the character can be accessed by indexing through the string and converting to an integer.
decimal
- is a 128-bit data type suitable for financial and monetary calculations. It has 28-29 digit Precision. To initialize a decimal variable, use the suffix m or M.
double
- is a fundamental data type built into the compiler and used to define numeric variables holding numbers with decimal points.
float
- is a single-precision, 32-bit floating point data type.
int
- is a fundamental variable type built into the compiler and used to define numeric variables holding whole numbers.
uint
- is a 32-bit unsigned integral data type, with values ranging from 0 to 4294967295, inclusive.
nint
- is to define native-sized integers. These are 32-bit integers when running in a 32-bit process, or 64-bit integers when running in a 64-bit process. They can be used for interop scenarios, low-level libraries, and to optimize performance in scenarios where integer math is used extensively.
long
- contains 64 bits, or 8 bytesit is the size of 2 ints. It represents large integral numbers but not floating-points. It is aliased to Int64.
ulong
- that is used to declare a variable which can store an unsigned integer value from the range 0 to 18,446,744,073,709,551,615
short
- that is used to declare a variable which can store a signed integer value from the range -32, 768 to 32, 767.
ushort
- that is used to declare a variable which can store an unsigned integer value from the range 0 to 65,535.
Original Link: https://dev.to/mrazizbek/built-in-types-in-c-h7e
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To