I need to use a generic method that subtracts the two operands, like this, with some pseudo coding.
public double GetResult<T>(T Arg1, T Arg2) : where T contains "-" operator
{
return Arg1 - Arg2;
//No, they are not value types, they are classes implementing the "-" operator
//And eventually, they can be value types
}
Is that possible? Like there is a where T = new()
for types with creators, is there a where T contains "-" operator
?