using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DB.MySqlClass
{
public class ReflectionTest
{
public ReflectionTest()
{
Console.WriteLine($"这是{this.GetType()}无参构造函数");
}
public ReflectionTest(string name)
{
Console.WriteLine($"这是{this.GetType()}有参构造函数{name.GetType()}");
}
public ReflectionTest(int id)
{
Console.WriteLine($"这是{this.GetType()}有参构造函数{id.GetType()}");
}
public ReflectionTest(int id ,string name)
{
Console.WriteLine($"这是{this.GetType()}有两个参数构造函数,类型为{id.GetType()}和{name.GetType()}");
}
private void Test(string name)
{
Console.WriteLine($"这是{0}的Test私有方法{this.GetType()}");
}
public static void Test1(string name)
{
Console.WriteLine($"这是{0}的Test1静态方法",typeof(ReflectionTest));
}
public static void Test3(int id )
{
Console.WriteLine($"这是{0}的Test3重载方法", typeof(ReflectionTest));
}
public static void Test3(string name)
{
Console.WriteLine($"这是{0}的Test3重载方法", typeof(ReflectionTest));
}
public void Test2()
{
Console.WriteLine($"这是{0}的Test2方法", this.GetType());
}
}