Is there a way to specify that a generic type be of one type or another type?
public class SoftDrink<T>
where T : TypeOne or TypeTwo
{ }
a/c (plural a/cs) Abbreviation of account. a cheque marked a/c payee may not be deposited in a bank account which does not belong to the named payee. Initialism of air conditioning.
A/C is an abbreviation for account/ current An account/ current is used to help determine a company's balance of trade.
a.c.: Abbreviation on a prescription meaning before meals; from the Latin "ante cibum", before meals. This is one of a number of abbreviations of Latin terms that have traditionally been used in writing prescriptions.
AC Account means an annual compensation account maintained under the Plan for a Participant in accordance with Article III.
Nope because that wouldn't make any sense. If you try to access a member function of "T", how can the compiler tell which base class to try and resolve members of?
You could try creating a common interface for TypeOne and TypeTwo and having the constraint specify that interface? What are you trying to accomplish, exactly?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With