Прочитај на енглеском

Делите путем


PSInvalidCastException Class

Definition

Defines the exception thrown for type conversion errors.

C++
public ref class PSInvalidCastException : InvalidCastException, System::Management::Automation::IContainsErrorRecord
Inheritance
PSInvalidCastException
Attributes
Implements

Constructors

PSInvalidCastException()

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

PSInvalidCastException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of PSInvalidCastException with serialization parameters.

PSInvalidCastException(String, Exception)

Initializes a new instance of PSInvalidCastException setting the message and innerException.

PSInvalidCastException(String)

Initializes a new instance of PSInvalidCastException setting the message.

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.

Applies to

Производ Верзије
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0