Returns unique values from an IEnumerable. Uniqueness is determined using the default equality comparer.
int[] array = { 1, 2, 3, 4, 2, 5, 3, 1, 2 };
var distinct = array.Distinct();
// distinct = { 1, 2, 3, 4, 5 }
To compare a custom data type, we need to implement the IEquatable<T> i...