Let's say I have the following classes:
public class A
{
public string a {get; set;}
}
public class B
{
public int b {get; set;}
}
public class C
{
public DateTime {get; set;}
}
...and so on. If I had multiple inheritance, what I could do is:
public class AC : A, C {}
public class BD : B, D {}
public class ACD : AC, D {}
...in which the child classes would inherit the properties of the parent classes. Assume for this situation that there are only properties involved, and that there is no duplication of properties. In C#, there is no such thing as multiple inheritance, so my notation above won't work. I also know that interfaces won't buy me anything, because an interface will only require that the implementing class implement the properties (the properties in our real-world problem all have annotations, too, which can't be put in interfaces).
Currently, we are solving the problem through stringing inheritances together, but we want something more flexible. And the only other alternative we can think of is copy/paste (obviously not optimal). Any strategy ideas for solving this puzzle?