Dumping the methods and their parameters for a class. : ParameterInfo : Reflection C# Source Code


Custom Search

C# Source Code » Reflection » ParameterInfo »

 

Dumping the methods and their parameters for a class.








    
 


using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Collections;

class MainClass {
    public static void DumpParameters(ParameterInfo[] pars) {
        foreach (ParameterInfo pi in pars) {
            Console.WriteLine("\n  Parameter Name: {0}",pi.Name);
            Console.WriteLine("  Parameter Type: {0}",pi.ParameterType);
            Console.WriteLine("  Is In? {0}",pi.IsIn);
            Console.WriteLine("  Is Out? {0}",pi.IsOut);
        }
    }



}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Reflection
» ParameterInfo