| ExtensionMethodsAddNoDuplicatesT Method (ListT, T) |
Add only unique items to a list.
Namespace:
DustProductions.Core
Assembly:
DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static bool AddNoDuplicates<T>(
this List<T> list,
T[] arrayToAdd
)
Parameters
- list
- Type: System.Collections.GenericListT
The list - arrayToAdd
- Type: T
An array of objects to add
Type Parameters
- T
- The type of the list's objects
Return Value
Type:
BooleanTrue if objects are added with nothing already in the list, false if one of the items was already in the list
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also