C# Int32 Struct


The Int32 Struct represents a 32-bit signed integer. It is an immutable value type that represents signed integers with values that range from negative 2,147,483,648 through positive 2,147,483,647.

Following are the fields of the Int32 Struct −

Sr.NoField & Description
1MaxValue
Represents the largest possible value of an Int32. This field is constant.
2MinValue
Represents the smallest possible value of an Int32. This field is constant.

Following are some of the methods of the Int32 Struct −

Sr.NoMethod & Description
1CompareTo(Int32)
Compares this instance to a specified 32-bit signed integer and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the specified 32-bit signed integer.
2CompareTo(Object)
Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the object.
3Equals(Int32)
Returns a value indicating whether this instance is equal to a specified Int32 value.
4Equals(Object)
Returns a value indicating whether this instance is equal to a specified object.
5GetHashCode()
Returns the hash code for this instance.
6GetTypeCode()
Returns the TypeCode for value type Int32.
7Parse(String)
Converts the string representation of a number to its 32-bit signed integer equivalent.

Updated on: 04-Dec-2019

437 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements