示例#1
0
文件: main.cs 项目: rmind9481/C-study
    public static void Main(string[] args)
    {
        GoodBye g = new GoodBye();

        Console.WriteLine(g.bye() == "good bye");

        GG gg = new GG();

        Console.WriteLine(gg.bye() == "GG");

        GoodBye g1 = new GG();

        Console.WriteLine(g1.bye() == "good bye");

        GG ggg = new GGG();

        Console.WriteLine(ggg.bye() == "GG");

        GGG ggg2 = new GGG();

        Console.WriteLine(ggg2.bye() == "GGG");

        GoodBye g2 = new GGG();

        Console.WriteLine(g2.bye() == "good bye");

        GG gg2 = new GGG();

        Console.WriteLine(gg2.bye() == "GG");

        // GG gg3 = new GoodBye();               // 문법적으로 오류
    }