Redigera

Dela via


MethodDataCollection.Add Method

Definition

Adds a MethodData object to the MethodDataCollection.

Overloads

Add(String)

Adds a MethodData to the MethodDataCollection. This overload will add a new method with no parameters to the collection.

Add(String, ManagementBaseObject, ManagementBaseObject)

Adds a MethodData to the MethodDataCollection. This overload will add a new method with the specified parameter objects to the collection.

Add(String)

Source:
MethodSet.cs
Source:
MethodSet.cs
Source:
MethodSet.cs

Adds a MethodData to the MethodDataCollection. This overload will add a new method with no parameters to the collection.

public:
 virtual void Add(System::String ^ methodName);
public virtual void Add (string methodName);
abstract member Add : string -> unit
override this.Add : string -> unit
Public Overridable Sub Add (methodName As String)

Parameters

methodName
String

The name of the method to add.

Remarks

Adding MethodData objects to the MethodDataCollection can only be done when the class has no instances. Any other case will result in an exception.

.NET Framework Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

Applies to

Add(String, ManagementBaseObject, ManagementBaseObject)

Source:
MethodSet.cs
Source:
MethodSet.cs
Source:
MethodSet.cs

Adds a MethodData to the MethodDataCollection. This overload will add a new method with the specified parameter objects to the collection.

public:
 virtual void Add(System::String ^ methodName, System::Management::ManagementBaseObject ^ inParameters, System::Management::ManagementBaseObject ^ outParameters);
public:
 virtual void Add(System::String ^ methodName, System::Management::ManagementBaseObject ^ inParams, System::Management::ManagementBaseObject ^ outParams);
public virtual void Add (string methodName, System.Management.ManagementBaseObject inParameters, System.Management.ManagementBaseObject outParameters);
public virtual void Add (string methodName, System.Management.ManagementBaseObject inParams, System.Management.ManagementBaseObject outParams);
abstract member Add : string * System.Management.ManagementBaseObject * System.Management.ManagementBaseObject -> unit
override this.Add : string * System.Management.ManagementBaseObject * System.Management.ManagementBaseObject -> unit
abstract member Add : string * System.Management.ManagementBaseObject * System.Management.ManagementBaseObject -> unit
override this.Add : string * System.Management.ManagementBaseObject * System.Management.ManagementBaseObject -> unit
Public Overridable Sub Add (methodName As String, inParameters As ManagementBaseObject, outParameters As ManagementBaseObject)
Public Overridable Sub Add (methodName As String, inParams As ManagementBaseObject, outParams As ManagementBaseObject)

Parameters

methodName
String

The name of the method to add.

inParametersinParams
ManagementBaseObject

The ManagementBaseObject holding the input parameters to the method.

outParametersoutParams
ManagementBaseObject

The ManagementBaseObject holding the output parameters to the method.

Remarks

Adding MethodData objects to the MethodDataCollection can only be done when the class has no instances. Any other case will result in an exception.

.NET Framework Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

Applies to