public class Program
{
public static void Main(string[] args)
{
new Program().test();
}
private void A(string a)
{
Console.WriteLine("----" + a);
Console.ReadKey();
}
public void test()
{
string str = "helloWorld";
str = str.Substring(0, 1).ToUpper() + str.Substring(1);
Type ht = this.GetType();
MethodInfo methodInfo = ht.GetMethod("A");
//object obj = Activator.CreateInstance(ht);
methodInfo.Invoke(this, new object[] { str });
}
}
{
public static void Main(string[] args)
{
new Program().test();
}
private void A(string a)
{
Console.WriteLine("----" + a);
Console.ReadKey();
}
public void test()
{
string str = "helloWorld";
str = str.Substring(0, 1).ToUpper() + str.Substring(1);
Type ht = this.GetType();
MethodInfo methodInfo = ht.GetMethod("A");
//object obj = Activator.CreateInstance(ht);
methodInfo.Invoke(this, new object[] { str });
}
}