-2

I am trying to achieve Multiple Inheritance in C#. Or Any alternative way to achive Multiple Inheritance. Can anyone help me ? Thanx in advance.

student
  • 13
  • 7

1 Answers1

2

Interfaces are a nice alternative. Essentially, an interface specifies what methods and properties must be implemented in a class that implements the interface. Sorry if that was confusing. Look here for more: https://msdn.microsoft.com/en-us/library/87d83y5b.aspx

Essentially, an interface would say that any class that uses this interface must implement Foo() and Bar(), but the interface would have no implementation. Rather it would be the responsibility of the class that uses the interface to implement those methods.

Interfaces can be a great tool depending on what you are looking for.

Iowa15
  • 3,027
  • 6
  • 28
  • 35