Let me have a template class ( class Entry<T>
), I want to make this class inherit from tow interfaces (IComparable<T>
and IEquatable<T>
), I've tried this:
class Entry<T> where T : IComparable<T>, IEquatable<T>
{
/* Whatever in the class */
}
and I've tried the next code:
class Entry<T> : IEquatable<T>, where T : IComparable<T>
{
/* Whatever in the class */
}
but non of them worked correctly, I don't know Why, anyone Can help me to know how I can use multiple interfaces inheritance?