I would like to write a generic sum function on an enumerable of elements that have the + operator implemented.
public T Add<T>(IEnumerable<t> list)=> list.Aggregate((x,y)=>x+y)
I need to say that T implement the + operator with an element of the same type.
with T:IADD<T>
I didn't find if such an interface exists in c#