<PackageReference Include="Newtonsoft.Json" Version="4.5.1" />

ConvertUtils

static class ConvertUtils
public static object Convert(object initialValue, CultureInfo culture, Type targetType)

Converts the value to the specified type.

public static object ConvertOrCast(object initialValue, CultureInfo culture, Type targetType)

Converts the value to the specified type. If the value is unable to be converted, the value is checked whether it assignable to the specified type.

public static TypeCode GetTypeCode(this IConvertible convertible)

public static TypeCode GetTypeCode(object o)

public static TypeCode GetTypeCode(Type t)

public static bool IsConvertible(object o)

public static bool IsConvertible(Type t)

public static bool IsInteger(object value)

public static IConvertible ToConvertible(object o)

public static object ToValue(INullable nullableValue)

public static bool TryConvert(object initialValue, CultureInfo culture, Type targetType, out object convertedValue)

Converts the value to the specified type.