I know that interfaces cannot contain operators, but is there a way I can require / tell the compiler that the + and / operators will be implemented by a certain class?
I want to do something like this:
public class AutoAverage<T> where T:(overloads + and /)
{
private List<T> history ; // 10-20 values
public T NextAvg( T newValue )
{
// implementation wants to push newValue
// into history, then sum
// values in history and return an average
}
}