ParameterBuilder Class

ParameterBuilder Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Creates or associates parameter information.

System::Object
  System.Reflection.Emit::ParameterBuilder

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

No code example is currently available or this language may not be supported.

The ParameterBuilder type exposes the following members.

  NameDescription
Public propertyAttributesGets the attributes for this parameter.
Public propertyIsInGets a value that indicates whether this is an input parameter.
Public propertyIsOptionalGets a value that indicates whether this parameter is optional.
Public propertyIsOutGets a value that indicates whether this parameter is an output parameter.
Public propertyNameGets the name of this parameter.
Public propertyPositionGets the signature position for this parameter.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSetConstantSets the default value of the parameter.
Public methodSetCustomAttribute(CustomAttributeBuilder)Set a custom attribute using a custom attribute builder.
Public methodSetCustomAttribute(ConstructorInfo, array<Byte>)Set a custom attribute using a specified custom attribute blob.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

Parameter attributes need to consistent with the method signature. If you specify Out attributes for a parameter, you should ensure that the type of that method parameter is a ByRef type.

Some ParameterBuilder attributes require that you provide viable parameters in order for the Microsoft intermediate language (MSIL) to work correctly at runtime. For example, if you define a ParameterBuilder with ParameterAttributes.Out for parameter 1 of a method, then parameter 1 of the method must be a reference such as Type.GetType("System.String&"), rather than Type.GetType("System.String").

The following example demonstrates how to create a dynamic method with a parameter passed by reference using ParameterBuilder.

No code example is currently available or this language may not be supported.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

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

Show:
© 2017 Microsoft