using System; namespace Ref { class Program { static void Main(string[] args) { SayHello obj = new SayHello(); Type type = typeof(SayHello); type.GetMethod("Say").Invoke(obj, new object[0]); Console.ReadKey(true); } } class SayHello { public void Say() { Console.WriteLine("Hello World!"); } } }