0

So I am having problem with interface and abstract class. I have code here:

interface ISučelje1
        {
            void Metoda();
        }

        interface ISučelje2
        {
            int Metoda();
        }

Now i declare abstract class with there two interface:

abstract class MojTip : ISučelje1, ISučelje2
        {
            public abstract void Metoda();
            public abstract int Metoda(); //here i got problem

        }

I don't know how to add second method I am getting error:

Type 'Program.MojTip' already defines a member called 'Metoda' with the same parameter types

Thanks in advance!

  • If linked duplicate is not enough please make sure to re-read results of your presumed search https://www.bing.com/search?q=c%23+multiple+interface+same+method and [edit] post to clarify why it was not enough. – Alexei Levenkov Jan 17 '18 at 22:44
  • I was searching but can't find for abstract class, the result gave me just for normal class inheritance method from interface, but i need inheritance method from two interface with same method name but into new abstract class and define these method with abstract method. – Marko Simic Jan 17 '18 at 22:52

0 Answers0