PSInvalidCastException Class

Definition

Defines the exception thrown for type conversion errors

public class PSInvalidCastException : InvalidCastException, System.Management.Automation.IContainsErrorRecord
Inheritance
PSInvalidCastException
Implements

Constructors

PSInvalidCastException()

Initializes a new instance of PSInvalidCastException with the message set to typeof(PSInvalidCastException).FullName

PSInvalidCastException(String)

Initializes a new instance of PSInvalidCastException setting the message

PSInvalidCastException(SerializationInfo, StreamingContext)

Initializes a new instance of PSInvalidCastException with serialization parameters

PSInvalidCastException(String, Exception)

Initializes a new instance of PSInvalidCastException setting the message and innerException

Properties

ErrorRecord

Gets the ErrorRecord associated with this exception

Methods

GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo with the data needed to serialize the PSInvalidCastException object.