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: Operator '!=' cannot be applied to operands of type 'T' and 'T'
{
// ...
}
So, how could I compare both values? And why do this error occur?
Thanks in advance!
See Question&Answers more detail:os