Somewhere between the grandiose and the nothing.
public static bool HasDuplicates_Version2<T>( this IEnumerable<T> sequence ) {
if ( null == sequence ) {
throw new ArgumentNullException( "sequence" );
}
var set = new HashSet<T>();
return !sequence.All( set.Add );
Post a Comment
No comments :
Post a Comment