System.Xml.Serialization.XmlSerializationReader.CreateInvalidCastException Method

Creates an InvalidCastException that indicates that an explicit reference conversion failed.

Syntax

protected Exception CreateInvalidCastException (Type type, object value, string id)

Parameters

type
The Type that an object cannot be cast to. This type is incorporated into the exception message.
value
The object that cannot be cast. This object is incorporated into the exception message.
id
A string identifier.

Returns

An InvalidCastException exception.

Remarks

The protected members of System.Xml.Serialization.XmlSerializationReader are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0