This topic has not yet been rated - Rate this topic

PSInvalidCastException Class

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The exception thrown when an error occurs during type conversions.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
'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.
Did you find this helpful?
(1500 characters remaining)