Skip to content

Parameter

Define a parameter to be used in class or interface method.

import { Parameter } from "@alloy-js/csharp";
<Parameter
attributes={AttributesProp}
default={Children}
in
name={string | Namekey}
optional
out
ref
refReadonly
refkey={Refkey}
type={Children}
/>
attributesoptional AttributesPropDefine attributes to attach
defaultoptional ChildrenDefault value for the parameter
inoptional booleanParameter modifier: The argument must be initialized before calling the method. The method can’t assign a new value to the parameter. The compiler might create a temporary variable to hold a copy of the argument to in parameters.
namestring | Namekey
optionaloptional booleanIf the parmaeter is optional(without default value)
outoptional booleanParameter modifier: The calling method isn’t required to initialize the argument before calling the method. The method must assign a value to the parameter.
refoptional booleanParameter modifier: The argument must be initialized before calling the method. The method can assign a new value to the parameter, but isn’t required to do so.
refReadonlyoptional booleanParameter modifier: The argument must be initialized before calling the method. The method can’t assign a new value to the parameter.
refkeyoptional Refkey
typeChildren