DustProductions.Core API Documentation
DustProductions.Core API Documentation
DustProductions.Core
ExtensionMethods Class
ExtensionMethods Methods
AddNoDuplicates Method
AddNoDuplicates(T) Method (List(T), List(T))
AddNoDuplicates(T) Method (List(T), T)
AddNoDuplicates(T) Method (List(T), T[])
ExtensionMethods
AddNoDuplicates
T
Method (List
T
, List
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
C#
Copy
public
static
bool
AddNoDuplicates
<T>(
this
List
<T>
list
,
List
<T>
listToAdd
)
Parameters
list
Type:
System.Collections.Generic
List
T
The list
listToAdd
Type:
System.Collections.Generic
List
T
A list of objects to add
Type Parameters
T
The type of the list's objects
Return Value
Type:
Boolean
True 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
List
T
. 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
Reference
ExtensionMethods Class
AddNoDuplicates Overload
DustProductions.Core Namespace