Updated: April 27, 2016
Applies To: Windows PowerShell
The exception thrown when the referenced method detects that an error has occurred while invoking the method.
Assembly: System.Management.Automation (in System.Management.Automation.dll)
Creates a newobject that is empty.
Creates a newobject that contains information read from the provided serialization information.
Creates a newobject that contains an exception message.
Creates a newobject that contains an exception message and the inner exception that caused this exception to be thrown.
Gets the error record associated with the exception.(Inherited from RuntimeException.)
Gets or sets a value that indicates whether the exception was thrown from a throw statement.(Inherited from RuntimeException.)
For more information about the different types of methods used within the extended type system (ETS), see ETS Methods [ps].
If the Windows PowerShell runtime detects the error, a MethodException exception is thrown. For more information about other exceptions thrown by the extended type system, see ETS Errors and Exceptions [ps].
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.