Information
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.

RuntimeDefinedParameter Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Represents a dynamic parameter that is constructed at runtime. The Windows PowerShell runtime adds this parameter to the parameter list of a cmdlet or function when some pre-defined condition is met, such as a specific argument is supplied for some other parameter.

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

System.Object
  System.Management.Automation.RuntimeDefinedParameter

public class RuntimeDefinedParameter

NameDescription
System_CAPS_pubmethodRuntimeDefinedParameter()

Creates a new RuntimeDefinedParameter object that is empty.

System_CAPS_pubmethodRuntimeDefinedParameter(String, Type, Collection<Attribute>)

Creates a new RuntimeDefinedParameter object that contains the name of the parameter, the .NET Framework type of the parameter, and the attributes of the parameter.

NameDescription
System_CAPS_pubpropertyAttributes

Gets the attributes of the parameter.

System_CAPS_pubpropertyIsSet

Gets and sets a Boolean value that indicates that the parameter binder has set the value of the parameter.

System_CAPS_pubpropertyName

Gets and sets the name of the parameter.

System_CAPS_pubpropertyParameterType

Gets and sets the .NET Framework type of the parameter.

System_CAPS_pubpropertyValue

Gets and sets the value of the parameter.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

To add a dynamic parameter to a function, use the DynamicParam keyword. The syntax is as follows.

DynamicParam {<ScriptBlock>}

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: