I basically have the following:
public static bool IsBetween<T>(this T value, T a, T b)
where T : IComparable
{
...
}
public static bool IsBetween<T>(this T value, T a, T b)
where T : IComparable<T>
{
...
}
The problem is that I cannot do this, because you cannot have a member with the same signature, even if the restrictions are different. But it cannot be said that the restriction is either IComparableOR IComparable<T>. So I'm not sure what to do here, except to just pick one and go with it. And, no matter which one I choose, I lose each other because they are separated and not inherited from each other (which makes sense).
I missed something here, is there a way to do this with both, or will I need to choose one (maybe the general version)?
source
share