Is there some interface like this in .Net
public interface IOperable<T>
{
T Add(T add);
T Substract(T subs);
T Multiply(T mult);
T Divide(T div);
//and so on
}
For manage generics that you know will be operable? Or even primitives.
For example for a class Interval<T>
we will be able to get the Lenght if End and Start will be IOperable
(End.Substract(Start);
).
I know ISet<T>
operations, but that approach is for non continuous cualitative elements, but for continuous elements i didn't see any approach in c#.
If not, why not exists in current .Net? Developing reasons? Philosophical? Are there any library that offers this approach?