Sdílet prostřednictvím


PSCodeMethod(String, MethodInfo) Constructor

Definition

Initializes a new instance of the PSCodeMethod class.

public:
 PSCodeMethod(System::String ^ name, System::Reflection::MethodInfo ^ codeReference);
public PSCodeMethod (string name, System.Reflection.MethodInfo codeReference);
new System.Management.Automation.PSCodeMethod : string * System.Reflection.MethodInfo -> System.Management.Automation.PSCodeMethod
Public Sub New (name As String, codeReference As MethodInfo)

Parameters

name
String

Name of the property.

codeReference
MethodInfo

This should be a public static method where the first parameter is an PSObject.

Exceptions

For invalid arguments.

If the codeReference does not have the right format.

Applies to