C# ParameterInfo Member
Description
ParameterInfo Member
Gets a value indicating the member
in which the parameter is implemented.
Syntax
ParameterInfo.Member
has the following syntax.
public virtual MemberInfo Member { get; }
Example
using System;/* w ww . j a v a2 s . c o m*/
using System.Reflection;
using System.Threading;
using System.Reflection.Emit;
public class ParameterInfo_IsIn_IsOut_IsOptional
{
public static void Main()
{
Assembly[] myAssemblies = Thread.GetDomain().GetAssemblies();
Assembly myAssembly = null;
Type myType = myAssembly.GetType("MyType");
MethodBase myMethodBase = myType.GetMethod("MyMethod");
ParameterInfo[] myParameters = myMethodBase.GetParameters();
for(int i = 0; i < myParameters.Length; i++)
{
Console.WriteLine(myParameters[i].Member);
}
}
}