PostSharpAPI ReferencePost­Sharp.​ReflectionCustom­Reflection­BinderChange­Type
Open sandboxFocus

Method ChangeType

ChangeType(Object, Type, CultureInfo)

Changes the type of the given langword_csharp_Object to the given langword_csharp_Type.

public override object ChangeType(object value, Type type, CultureInfo culture)
Type Name Description
Object value

The object to change into a new langword_csharp_Type.

Type type

The new langword_csharp_Type that value will become.

CultureInfo culture

An instance of CultureInfo that is used to control the coercion of data types. If culture is null, the CultureInfo for the current thread is used.
Note For example, this parameter is necessary to convert a langword_csharp_String that represents 1000 to a langword_csharp_Double value, because 1000 is represented differently by different cultures.

Type Description

An object that contains the given value as the new type.