PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Reflection Namespace / Custom­Reflection­Binder Class / Custom­Reflection­Binder Methods / Custom­Reflection­Binder.​Change­Type Method

CustomReflectionBinder.ChangeType Method

Changes the type of the given Object to the given Type.

Namespace:  PostSharp.Reflection
Assembly:  PostSharp (in PostSharp.dll) Version: 6.9.11.0 (6.9.11.0)
Syntax
C#
public override Object ChangeType(
	Object value,
	Type type,
	CultureInfo culture
)

Parameters

value
Type: System.Object
The object to change into a new Type.
type
Type: System.Type
The new Type that value will become.
culture
Type: System.Globalization.CultureInfo
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 String that represents 1000 to a Double value, because 1000 is represented differently by different cultures.

Return Value

Type: Object
An object that contains the given value as the new type.
See Also