コード例 #1
0
        static void Main(string[] args)
        {
            var human = new Human("John", "Doe");

            human.PrintHumanName();

            ClassHidingTheMethod.TestA(12);

            ChildOfB g = new ChildOfB();

            g.PrintBaseMethod();

            var p1 = new PizaTuna();

            //var p1 = new PizaTuna(0.2, 0.5, .4 , .1);
            p1.PrintIngredient(p1);

            var hiddenMthodEg = new TheMethodSealingClass();

            hiddenMthodEg.test();
            var person1 = new TheClassThatNeedsToCallTheBaseConstrutor("Zahid", "Farook", "Dutch");

            person1.Fullname(person1);
        }
コード例 #2
0
 public void Fullname(TheClassThatNeedsToCallTheBaseConstrutor obj) => Console.WriteLine($"Fname: {Fname}\nLname: {Lname}\nNationality: {obj.Nationality} ");