WikiCrawler/Utility/IListUtility.cs
/// <summary>
/// Removes all duplicate items from the list, leaving only the first instance of each item.
/// </summary>
Removes all duplicate items from the list, leaving only the first instance of each item.
Removes all duplicate items from the list leaving only the first instance of each item .
public static void RemoveDuplicates<T>(this IList<T> list) where T : class
	{
		for (int i = 0; i < list.Count; i++)
		{
			for (int j = list.Count - 1; j > i; j--)
			{
				if (list[j] == list[i])
				{
					list.RemoveAt(j);
				}
			}
		}
	}
public static void RemoveDuplicates < T > ( this IList < T > list ) where T : class { for ( int i = 0 ; i < list . Count ; i ++ ) { for ( int j = list . Count - 1 ; j > i ; j -- ) { if ( list [ j ] == list [ i ] ) { list . RemoveAt ( j ) ; } } } }
Removes all duplicate items from the list, leaving only the first instance of each item.
Removes all duplicate items from the list leaving only the first instance of each item .
IList<T>
this