Table of Contents

Class Converts<T>

Namespace
NumSharp.Utilities
Assembly
NumSharp.dll

Provides various methods related to Convert based on give T.

public static class Converts<T>

Type Parameters

T
Inheritance
Converts<T>
Inherited Members

Methods

From(bool)

Converts bool to T using staticly cached FindConverter<TIn, TOut>().

public static T From(bool obj)

Parameters

obj bool

The object to convert to T from bool

Returns

T

A T

From(byte)

Converts byte to T using staticly cached FindConverter<TIn, TOut>().

public static T From(byte obj)

Parameters

obj byte

The object to convert to T from byte

Returns

T

A T

From(char)

Converts char to T using staticly cached FindConverter<TIn, TOut>().

public static T From(char obj)

Parameters

obj char

The object to convert to T from char

Returns

T

A T

From(decimal)

Converts decimal to T using staticly cached FindConverter<TIn, TOut>().

public static T From(decimal obj)

Parameters

obj decimal

The object to convert to T from decimal

Returns

T

A T

From(double)

Converts double to T using staticly cached FindConverter<TIn, TOut>().

public static T From(double obj)

Parameters

obj double

The object to convert to T from double

Returns

T

A T

From(short)

Converts short to T using staticly cached FindConverter<TIn, TOut>().

public static T From(short obj)

Parameters

obj short

The object to convert to T from short

Returns

T

A T

From(int)

Converts int to T using staticly cached FindConverter<TIn, TOut>().

public static T From(int obj)

Parameters

obj int

The object to convert to T from int

Returns

T

A T

From(long)

Converts long to T using staticly cached FindConverter<TIn, TOut>().

public static T From(long obj)

Parameters

obj long

The object to convert to T from long

Returns

T

A T

From(float)

Converts float to T using staticly cached FindConverter<TIn, TOut>().

public static T From(float obj)

Parameters

obj float

The object to convert to T from float

Returns

T

A T

From(string)

Converts string to T using staticly cached FindConverter<TIn, TOut>().

public static T From(string obj)

Parameters

obj string

The object to convert to T from string

Returns

T

A T

From(ushort)

Converts ushort to T using staticly cached FindConverter<TIn, TOut>().

public static T From(ushort obj)

Parameters

obj ushort

The object to convert to T from ushort

Returns

T

A T

From(uint)

Converts uint to T using staticly cached FindConverter<TIn, TOut>().

public static T From(uint obj)

Parameters

obj uint

The object to convert to T from uint

Returns

T

A T

From(ulong)

Converts ulong to T using staticly cached FindConverter<TIn, TOut>().

public static T From(ulong obj)

Parameters

obj ulong

The object to convert to T from ulong

Returns

T

A T

ToBoolean(T)

Converts T to bool using staticly cached FindConverter<TIn, TOut>().

public static bool ToBoolean(T obj)

Parameters

obj T

The object to convert to bool

Returns

bool

A bool

ToByte(T)

Converts T to byte using staticly cached FindConverter<TIn, TOut>().

public static byte ToByte(T obj)

Parameters

obj T

The object to convert to byte

Returns

byte

A byte

ToChar(T)

Converts T to char using staticly cached FindConverter<TIn, TOut>().

public static char ToChar(T obj)

Parameters

obj T

The object to convert to char

Returns

char

A char

ToDecimal(T)

Converts T to decimal using staticly cached FindConverter<TIn, TOut>().

public static decimal ToDecimal(T obj)

Parameters

obj T

The object to convert to decimal

Returns

decimal

A decimal

ToDouble(T)

Converts T to double using staticly cached FindConverter<TIn, TOut>().

public static double ToDouble(T obj)

Parameters

obj T

The object to convert to double

Returns

double

A double

ToInt16(T)

Converts T to short using staticly cached FindConverter<TIn, TOut>().

public static short ToInt16(T obj)

Parameters

obj T

The object to convert to short

Returns

short

A short

ToInt32(T)

Converts T to int using staticly cached FindConverter<TIn, TOut>().

public static int ToInt32(T obj)

Parameters

obj T

The object to convert to int

Returns

int

A int

ToInt64(T)

Converts T to long using staticly cached FindConverter<TIn, TOut>().

public static long ToInt64(T obj)

Parameters

obj T

The object to convert to long

Returns

long

A long

ToSingle(T)

Converts T to float using staticly cached FindConverter<TIn, TOut>().

public static float ToSingle(T obj)

Parameters

obj T

The object to convert to float

Returns

float

A float

ToString(T)

Converts T to string using staticly cached FindConverter<TIn, TOut>().

public static string ToString(T obj)

Parameters

obj T

The object to convert to string

Returns

string

A string

ToUInt16(T)

Converts T to ushort using staticly cached FindConverter<TIn, TOut>().

public static ushort ToUInt16(T obj)

Parameters

obj T

The object to convert to ushort

Returns

ushort

A ushort

ToUInt32(T)

Converts T to uint using staticly cached FindConverter<TIn, TOut>().

public static uint ToUInt32(T obj)

Parameters

obj T

The object to convert to uint

Returns

uint

A uint

ToUInt64(T)

Converts T to ulong using staticly cached FindConverter<TIn, TOut>().

public static ulong ToUInt64(T obj)

Parameters

obj T

The object to convert to ulong

Returns

ulong

A ulong