create a new interface derived from ILetter:
public interface ILetterAorB : ILetter
{
}
Then, derive a A and B from this interface.
Finally create a list like:
List<ILetterAorB> list;
Have an Interface ILetter with classes A, B, C, D that all implement the ILetter interface.
I want a List<A or B> only.
Is that possible?
List<ILetter> does not solve my problem.
Neither does List<A> and a separate List<B>.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I guess these are the correct answers to my question ... "there is not a way".
I was building a WebControl and wanted a property that was basicilly a List<HyperLink or LinkButton>.
I suppose I could make a MyLinkButton : LinkButton, IMyInterface and a MyHyperLink : HyperLink, IMyInterface and then create the property on my control as a List<IMyInterface>, but that is not really what I was looking for.
I'll divide up the points for everyone's efforts.
Business Accounts
Answer for Membership
by: p_davisPosted on 2008-08-07 at 11:55:25ID: 22184072
what do you mean you want a list a or b?
why doesn't List<A> or List<B> not solve your problem -- what exactly are you trying to do?