ソースコード
public static T[] FindDuplicatedElements<T>( this IReadOnlyList<T> self ) { return self .GroupBy( x => x ) .Where( x => 2 <= x.Count() ) .Select( x => x.Key ) .ToArray() ; }
public static T[] FindDuplicatedElements<T>( this IReadOnlyList<T> self ) { return self .GroupBy( x => x ) .Where( x => 2 <= x.Count() ) .Select( x => x.Key ) .ToArray() ; }