Table of Contents

Method ToInt32

Namespace
MongoDB.Bson.Serialization.Options
Assembly
MongoDB.Bson.dll

ToInt32(decimal)

Converts a Decimal to an Int32.

public int ToInt32(decimal value)

Parameters

value decimal

A Decimal.

Returns

int

An Int32.

ToInt32(Decimal128)

Converts a Decimal128 to an Int32.

public int ToInt32(Decimal128 value)

Parameters

value Decimal128

A Decimal128.

Returns

int

An Int32.

ToInt32(double)

Converts a Double to an Int32.

public int ToInt32(double value)

Parameters

value double

A Double.

Returns

int

An Int32.

ToInt32(float)

Converts a Single to an Int32.

public int ToInt32(float value)

Parameters

value float

A Single.

Returns

int

An Int32.

ToInt32(int)

Converts an Int32 to an Int32.

public int ToInt32(int value)

Parameters

value int

An Int32.

Returns

int

An Int32.

ToInt32(long)

Converts an Int64 to an Int32.

public int ToInt32(long value)

Parameters

value long

An Int64.

Returns

int

An Int32.

ToInt32(short)

Converts an Int16 to an Int32.

public int ToInt32(short value)

Parameters

value short

An Int16.

Returns

int

An Int32.

ToInt32(uint)

Converts a UInt32 to an Int32.

[CLSCompliant(false)]
public int ToInt32(uint value)

Parameters

value uint

A UInt32.

Returns

int

An Int32.

ToInt32(ulong)

Converts a UInt64 to an Int32.

[CLSCompliant(false)]
public int ToInt32(ulong value)

Parameters

value ulong

A UInt64.

Returns

int

An Int32.

ToInt32(ushort)

Converts a UInt16 to an Int32.

[CLSCompliant(false)]
public int ToInt32(ushort value)

Parameters

value ushort

A UInt16.

Returns

int

An Int32.