using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
namespace
{
class Myclass //
{
int a;
int b;
public Myclass(int x, int y)
{
a = x;
b = y;
}
public int Sum()
{
return a + b;
}
public void Set(int i, int j)
{
a = i;
b = j;
}
public void show()
{
Console.WriteLine("x:{0},y:{0}", a, b);
}
}
class Program
{
static void Main(string[] args)
{
//Type
//.Net typeof
Type ty = typeof(Myclass);// //
Console.WriteLine(ty.Name);//
MethodInfo[] m = ty.GetMethods();//Methods
Module myModule;
// myModule.
// Console.WriteLine(Modul);
foreach (MethodInfo m1 in m)//
{
Console.Write(" " + m1.ReturnType.Name + " " + m1.Name + " (");
ParameterInfo[] pt = m1.GetParameters();//
for (int i = 0; i < pt.Length; i++)//
{
Console.Write(pt[i].ParameterType.Name + " " + pt[i].Name);//
if (i + 1 < pt.Length)//
{
Console.Write(",");//
}
}
Console.WriteLine(")");//WriteLine +
}
Console.ReadLine();
}
}
}