Home

Int32

Int32 is a 32-bit signed integer data type used in the .NET framework and related languages. It is exposed as the System.Int32 structure, and in C# the keyword int is an alias for this type. The type occupies four bytes of memory and uses two's complement representation for negative values, which governs how overflow behaves and how bitwise operations operate.

The value range of Int32 spans from -2,147,483,648 to 2,147,483,647. In hexadecimal form, the minimum is 0x80000000

Int32 is commonly used for numeric calculations, indexing, and loop counters, and it serves as the default

In addition to basic usage, Int32 can be parsed from strings using methods like TryParse, and converted

Compared to UInt32, Int32 represents negative values and has a symmetric range around zero. While Int32 is

and
the
maximum
is
0x7FFFFFFF.
When
stored
in
memory,
the
byte
order
depends
on
the
system’s
endianness,
but
the
numeric
value
remains
the
same.
integer
type
in
many
APIs
and
data
structures.
Arithmetic
on
Int32
values
follows
language
rules
for
overflow:
in
C#,
arithmetic
is
unchecked
by
default,
so
overflows
wrap
around;
in
a
checked
context,
an
OverflowException
is
thrown.
to
strings
with
ToString.
It
can
be
cast
to
wider
types
or
to
unsigned
types
(e.g.,
UInt32)
with
explicit
conversion
as
needed.
specific
to
.NET,
other
languages
provide
separate
32-bit
signed
integer
types,
such
as
int32_t
in
C/C++
and
Java’s
int,
which
is
also
32-bit
signed
but
not
the
same
type
as
.NET’s
Int32.