static void Main(string[] args)
        {
            Console.WriteLine($"Call through B: {ClassB.Add(1, 2)}");

            Console.WriteLine($"Call through B to A: {ClassB.Add2(1, 2)}");

            Console.WriteLine($"Call through C (B): {ClassC.AddB(1, 2)}");

            Console.WriteLine($"Call through C (B): {ClassC.AddB2(1, 2)}");

            Console.ReadLine();
        }
Beispiel #2
0
        static void Main1(string[] args)
        {
            var  dd = default(KeyValuePair <int, int>);
            bool sd = default(KeyValuePair <int, int>).Equals(new KeyValuePair <int, int>(0, 0));

            ClassB classB = new ClassB();
            ClassC classC = new ClassC();

            classB.Test();
            classC.Test();
            ((ClassA)classB).Test();
            ((ClassA)classC).Test();


            Console.Read();
        }