In C#, Int32 Struct represents 32-bit signed integer(also termed as int data type) starting from range -2,147,483,648 to +2,147,483,647. It also provides different types of method to perform various operations. You can perform the mathematical operation like addition, subtraction, multiplication, etc. on Int32 type. It supports bitwise operations like AND, OR, XOR, etc. It provides full support for standard and custom numeric format strings. You can call the methods of Convert and Math class to perform operations on Int32 value. Int32 struct inherits the ValueType class which inherits the Object class.
|MaxValue||This field is used to represent the largest possible value of an Int32. This field is constant.|
|MinValue||This field is used to represent the smallest possible value of Int32. This field is constant.|
Value 1: 34 Value 2: 30 Value 3: 59 Maximum Value: 2147483647 Minimum Value: -2147483648
|CompareTo()||This method is used to compare this instance to a specified object or Int32 and returns an indication of their relative values.|
|Equals()||This method is used to return a value indicating whether this instance is equal to a specified object or Int32.|
|GetHashCode()||This method is used to return the hash code for this instance.|
|GetTypeCode()||This method is used to return the TypeCode for value type Int32.|
|Parse()||This method is used to convert the string representation of a number to its 32-bit signed integer equivalent.|
|ToString()||This method is used to convert the numeric value of this instance to its equivalent string representation.|
|TryParse()||This method is used to convert the string representation of a number to its 32-bit signed integer equivalent. A return value indicates whether the operation succeeded.|
70 is not equal to 89
Get the type code of var1: Int32 Get the type code of var2: Int32 Get the type code of var3: Int32
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.