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

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft