Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - interface IPapka
 - {
 - void Print();
 - }
 - interface IMikki
 - {
 - void Print();
 - void Print(int a, int b);
 - }
 - class Test: IPapka,IMikki
 - {
 - void IPapka.Print()
 - {
 - Console.WriteLine("Papka print in parent");
 - }
 - void IMikki.Print()
 - {
 - Console.WriteLine("Mikki print in parent");
 - }
 - public void Print(int a, int b)
 - {
 - Console.WriteLine(a+b+" in parent");
 - }
 - }
 - class Child : Test,IMikki,IPapka
 - {
 - void IPapka.Print()
 - {
 - Console.WriteLine("Papka print in child");
 - }
 - void IMikki.Print()
 - {
 - Console.WriteLine("Mikki print in child");
 - }
 - public void Print(int a, int b)
 - {
 - Console.WriteLine(a + b + " in child");
 - }
 - }
 - static void Main(string[] args)
 - {
 - Test c = new Child();
 - c.Print(3,5);
 - (c as IPapka).Print();
 - (c as IMikki).Print();
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment