Windows Dev Center

Collapse the table of content
Expand the table of content
Expand Minimize
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PSInvalidCastException Class

The exception thrown when an error occurs during type conversions.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim instance As PSInvalidCastException

[SerializableAttribute] 
public class PSInvalidCastException : InvalidCastException, IContainsErrorRecord
/** @attribute SerializableAttribute() */ 
public class PSInvalidCastException extends InvalidCastException implements IContainsErrorRecord
SerializableAttribute 
public class PSInvalidCastException extends InvalidCastException implements IContainsErrorRecord

This exception can be thrown by Windows PowerShell or by a custom type converter when a call is made to the ConvertTo method.

For more information about how Windows PowerShell performs a type conversion, see ETS Type Conversion.


System.Object
   System.Exception
     System.SystemException
       System.InvalidCastException
        System.Management.Automation.PSInvalidCastException

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms


Show:
© 2015 Microsoft