本文整理汇总了VB.NET中System.Reflection.Emit.MethodBuilder.GetParameters方法的典型用法代码示例。如果您正苦于以下问题:VB.NET MethodBuilder.GetParameters方法的具体用法?VB.NET MethodBuilder.GetParameters怎么用?VB.NET MethodBuilder.GetParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Reflection.Emit.MethodBuilder
的用法示例。
在下文中一共展示了MethodBuilder.GetParameters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Type
Dim myType1 As TypeBuilder = myModBuilder.DefineType("MyMathFunctions", _
TypeAttributes.Public)
Dim myMthdBuilder As MethodBuilder = myType1.DefineMethod("AddToRefValue", _
MethodAttributes.Public, Nothing, _
New Type() {Type.GetType("System.Int32&"), GetType(Integer)})
Dim myParam1 As ParameterBuilder = myMthdBuilder.DefineParameter(1, _
ParameterAttributes.Out, "thePool")
Dim myParam2 As ParameterBuilder = myMthdBuilder.DefineParameter(2, _
ParameterAttributes.In, "addMeToPool")
' Create body via ILGenerator here, and complete the type.
Dim myParams As ParameterInfo() = myMthdBuilder.GetParameters()
Console.WriteLine("Method: {0}", myMthdBuilder.Name)
Dim myParam As ParameterInfo
For Each myParam In myParams
Console.WriteLine("------- Parameter: {0} {1} at pos {2}, with attribute {3}", _
myParam.ParameterType, myParam.Name, myParam.Position, _
myParam.Attributes.ToString())
Next myParam