4 ms·
Huh? I'm not sure where you're getting at.
by dahauns 9y ago
Huh? I'm not sure where you're getting at.
- masklinn 9y agoI'm only asking if the snippet you posted is C# or something else, and noting that if it's C# I have learned something new about the language. Except now that I look at it more specifically, it looks like a bound on the class's generic parameter rather than a condition on the interface implementation? As in you're defining a SortedList class which implements ICollection and IEnumerable but requires T:IComparable, not defining a SortedList class which implements IEnumerable if T is IComparable. And if that reading is correct, Java can do it just fine: class SortedList<T extends Comparable<T>> implements Collection<T>, Iterable<T> however it's got nothing to do with conditional conformance.