Converts the given object to the specified type.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
obj (or a nested member of obj) contains a "__type" property that indicates a custom type, but the type resolver that is associated with the serializer cannot find a corresponding managed type.
obj (or a nested member of obj) contains a "__type" property that indicates a custom type, but the result of deserializing the corresponding JSON string cannot be assigned to the expected target type.
obj (or a nested member of obj) contains a "__type" property that indicates either Object or a non-instantiable type (for example, an abstract type or an interface).
An attempt was made to convert obj to an array-like managed type, which is not supported for use as a deserialization target.
It is not possible to convert obj to T.
obj is a dictionary type and a non-string key value was encountered.
obj includes member definitions that are not available on type T.
The ConvertToType method tries to convert the object instance that is represented by obj to an instance of type T. During this conversion there is no guarantee that object reference equality is maintained. Therefore, you cannot assume that obj and T refer to the same object.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.