Windows desktop applications
Collapse the table of content
Expand the table of content
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.

GetValueException Class

Exception thrown by the Windows PowerShell runtime if the member does not support a getter, such as a write only property.

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

Dim instance As GetValueException

public ref class GetValueException : public ExtendedTypeSystemException
/** @attribute SerializableAttribute() */ 
public class GetValueException extends ExtendedTypeSystemException
public class GetValueException extends ExtendedTypeSystemException

For a C# classes, this means that a property was written something like this: public class C { public int WriteOnly { set { /*...*/ } } } For adapted objects, no Get method was specified.

Script developers can trap this exception by using the Trap statement (defined by the Windows PowerShell language) in their scripts. For more information about other exceptions thrown by ETS, see ETS Errors and Exceptions.

This exception is thrown when the Windows PowerShell runtime recognizes that the error has occurred. When the underlying getter of the referenced member recognizes that the error has occurred, it throws a GetValueInvocationException exception.

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

© 2016 Microsoft