예제 #1
0
        static void PrintOptions(Options opts)
        {
            DoSomethingUseful dsu = new DoSomethingUseful();

            dsu.Organization = opts.Organization;
            dsu.ProjectName  = opts.ProjectName;
            Debug.WriteLine(dsu.ToString());
        }
        static void Main(string[] args)
        {
            // creating delegates
            DoSomethingUseful methodA = GetDelegate("NamespaceA", "ClassAB", "MyMethod");
            DoSomethingUseful methodB = GetDelegate("NamespaceA", "ClassAB", "MyStaticMethod");

            // usage
            methodA();
            methodB();

            Console.WriteLine();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();
        }