コード例 #1
0
    private static void Main(string[] args)
    {
        ClassToMakeButtonFor1.RegisterMe();
        ClassToMakeButtonFor2.RegisterMe();
        Button b = ButtonFactory.MakeMeAButton <ClassToMakeButtonFor1>();

        Console.WriteLine(b.Whatever);
        b = ButtonFactory.MakeMeAButton <ClassToMakeButtonFor2>();
        Console.WriteLine(b.Whatever);
        Console.ReadLine();
    }