public T[] GetDuplicates(T inputValue)
{
List<T> duplicates = new List<T>( );
for (int i = 0; i < this.Count; i++)
{
if (this[i].Equals(inputValue))
{
duplicates.Add(this[i]);
}
}//codego.net
return (duplicates.ToArray( ));
}
原文地址:http://10078001.blog.51cto.com/10068001/1629211