WikiCrawler/Utility/IListUtility.cs
/// <summary>
/// Adds the specified object to the list if it isn't already present.
/// </summary>
/// <returns>True if the object was added.</returns>
Adds the specified object to the list if it isn't already present.
Adds the specified object to the list if it isn ' t already present .
public static bool AddUnique<T>(this IList<T> list, T obj)
	{
		if (list.Contains(obj))
		{
			return false;
		}
		else
		{
			list.Add(obj);
			return true;
		}
	}
public static bool AddUnique < T > ( this IList < T > list , T obj ) { if ( list . Contains ( obj ) ) { return false ; } else { list . Add ( obj ) ; return true ; } }
Adds the specified object to the list if it isn't already present.
Adds the specified object to the list if it isn ' t already present .
True if the object was added.
True if the object was added .
IList<T>
this
obj
T