NSNumber.FromObject(Object) Method

Definition

Creates an NSNumber from a boxed numeric value or boolean.

public static Foundation.NSNumber FromObject(object value);
public static Foundation.NSNumber? FromObject(object? value);
static member FromObject : obj -> Foundation.NSNumber

Parameters

value
Object

A boxed numeric value (float, double, sbyte, byte, short, ushort, int, uint, long, ulong, nint, nuint, nfloat) or boolean.

Returns

An NSNumber representing the value, or null if the value type is not supported.

Applies to