System.Convert.ToInt32 Method

Converts the value of the specified object to a 32-bit signed integer.

Syntax

public static int ToInt32 (object value)

Parameters

value
An object that implements the IConvertible interface, or null.

Returns

A 32-bit signed integer equivalent to value, or zero if value is null.

Remarks

If value is not null, this method wraps a call to the IConvertible.ToInt32(IFormatProvider) implementation of the underlying type of value.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0