I\'m trying the following:
T value1 = el.value; // it\'s of type T already T value2 = default(T); if (value1 != value2) // gives the following error: Operato
Your surrounding generic class should list a constraint: T : IEquatable<T>
T : IEquatable<T>
And then you have to use value1.Equals(value2)
value1.Equals(value2)
The reason for all this is that not all types define operator ==
==