Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Struct

Int32

struct int

Module: System
Assembly: System.Runtime.dll
Source file: Int32.rvn

Inheritance: Object → ValueType → Int32
Implements: EquatableTo<Int32>, Formattable, Number

A signed 32-bit integer.

Properties

2 items
Static member: One: int Development: gets one for this numeric type.
Static member: Zero: int Development: gets zero for this numeric type.

Methods

12 items
CompareTo(other: Self) -> int Compares this value with the other value; returns a negative integer, zero or a positive integer for less than, equal to or greater than. Required implementation (no default). Defined by ComparableTo<Self>.CompareTo · Defined by ComparableTo<Self>.CompareTo
CompareTo(other: int) -> int Compares this value with the other value; returns a negative integer, zero or a positive integer for less than, equal to or greater than.
Static member: Divide(dividend: int, divisor: int) -> Result<int, IntegerDivisionError> Divides two signed integers, returning DivisionByZero or Overflow for invalid division.
Equals(other: int) -> bool Tests value equality with the other value. Implements EquatableTo<Int32>.Equals
Equals(other: object?) -> bool Tests reference identity by default; an ordinary class may override equality. Inherited from Object.Equals
GetHashCode() -> int Returns a stable identity hash by default; an ordinary class may override it consistently with equality. Inherited from Object.GetHashCode
GetType() -> TypeInfo Returns metadata for the concrete runtime type of this instance. Inherited from Object.GetType
Static member: Parse(text: string, culture: Culture) -> Result<int, NumberParseError> Parses explicit culture punctuation with strict three-digit grouping; whitespace is not accepted.
Static member: Parse(value: string) -> Result<int, NumberParseError> Parses an Int32, returning InvalidFormat or Overflow when the input cannot be represented.
ToString() -> string Returns the value or active error case name for display.
ToString(format: string, culture: Culture) -> string Formats with explicit culture. D pads integer digits; F adds fractional zeros; N also groups. Unsupported specifiers or precision fault. Parsing remains invariant. Implements Formattable.ToString
ToString(format: string) -> string Formats with the current culture. Supports empty/G/G0, D, F and N; D/F/N precision is 0–99.

Operators

4 items
Static member: operator +(left: int, right: int) -> int Development: Adds two values.
Static member: operator /(left: int, right: int) -> int Development: Divides left by right.
Static member: operator *(left: int, right: int) -> int Development: Multiplies two values.
Static member: operator -(left: int, right: int) -> int Development: Subtracts right from left.