Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Defining a Parameter with Reflection Emit

Parameter names and parameter attributes are optional. Optional information for a method parameter, such as name and attributes (specified using the ParameterAttributes enumeration) can be defined using the MethodBuilder.DefineParameter method, which returns a ParameterBuilder. Optional information for a constructor parameter can be defined using the ConstructorBuilder.DefineParameter method, which returns a ParameterBuilder.

ParameterBuilder.SetMarshal specifies how the parameter is marshaled. ParameterBuilder.SetConstant specifies the default value for a parameter.

Community Additions

ADD
Show:
© 2015 Microsoft