How to derive two abstract classes in C#
.net, c#, c#-4.0, interface
Solution
You can't multiple inherit using C#. You can however achieve this by using an interface.
public interface Ia
{
}
public interface Ib
{
}
public abstract class MainProject : Ia, Ib
{
}
C# interfaces only allow signatures of methods, properties, events and indexers. You will have to define the implementation of these in the `proj` (MainProgram) class.
Problem
I have app structure - ``` public abstract class a { } //defined in a.dll public abstract class b { } //defined in b.dll //Above 2 DLL reference added in main project where I want to derive both of this abstract classee like public abstract class proj : a, b { } ``` I am able to derive any one of it only not both. So pls guide me on missing things or wrong coding I had done.