ConstructorBuilder.DefineParameter(Int32, ParameterAttributes, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines a parameter of this constructor.
public:
System::Reflection::Emit::ParameterBuilder ^ DefineParameter(int iSequence, System::Reflection::ParameterAttributes attributes, System::String ^ strParamName);
public System.Reflection.Emit.ParameterBuilder DefineParameter (int iSequence, System.Reflection.ParameterAttributes attributes, string? strParamName);
public System.Reflection.Emit.ParameterBuilder DefineParameter (int iSequence, System.Reflection.ParameterAttributes attributes, string strParamName);
member this.DefineParameter : int * System.Reflection.ParameterAttributes * string -> System.Reflection.Emit.ParameterBuilder
Public Function DefineParameter (iSequence As Integer, attributes As ParameterAttributes, strParamName As String) As ParameterBuilder
Parameters
- iSequence
- Int32
The position of the parameter in the parameter list. Parameters are indexed beginning with the number 1 for the first parameter.
- attributes
- ParameterAttributes
The attributes of the parameter.
- strParamName
- String
The name of the parameter. The name can be the null string.
Returns
An object that represents the new parameter of this constructor.
Exceptions
iSequence
is less than 0 (zero), or it is greater than the number of parameters of the constructor.
The containing type has been created using CreateType().
Remarks
If you specify 0 (zero) for iSequence
, this method returns a ParameterBuilder instead of throwing an exception. There is nothing useful that you can do with this ParameterBuilder.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om