コード例 #1
0
ファイル: Program.cs プロジェクト: benmpeterson/CSharpLibrary
        static void Main(string[] args)
        {
            Person chris = new Person("Chris", "Sullivan");

            chris.TestMethod();



            Minor sophie = new Minor("Sophie", "O'Connor", true);

            sophie.DemoMethod();
            sophie.TestMethod();

            Person kenn = new Minor("Kenn", "Pascascion", true);//Can do this. Inheriting fro

            kenn.TestMethod();

            Minor benn = new Person("Harry", "Smith");//Can't do that
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: addemaree/CSharpLibrary
        static void Main(string[] args)
        {
            Person adam = new Person("Adam", "Demaree", 26);

            Minor christopher = new Minor("Christopher", "Demaree", 2, false);
        }