Dim instance As ParameterAttribute Dim value As Integer value = instance.Position instance.Position = value
Public Property Position As Integer
public int Position { get; set; }
public: property int Position { int get (); void set (int value); }
/** @property */ public int get_Position () /** @property */ public void set_Position (int value)
public function get Position () : int public function set Position (value : int)
This example shows how the Parameter attribute is used to declare a positional parameter.
[Parameter(Position = 0)] public string UserName { get { return userName; } set { userName = value; } } private string userName;
This property is an optional Named parameter of the Parameter attribute. For more information about the declaration syntax that is used to specify the Parameter attribute for cmdlets, see ParameterAttribute Declaration.