Class CollectionWithoutDuplicatesDC<T>
- Assembly
- SunamoDevCode.dll
Collection without duplicates implementation
public class CollectionWithoutDuplicatesDC<T> : CollectionWithoutDuplicatesBaseDC<T>
Type Parameters
TType of items in collection
- Inheritance
-
CollectionWithoutDuplicatesDC<T>
- Inherited Members
- Extension Methods
Constructors
CollectionWithoutDuplicatesDC()
Initializes a new collection without duplicates
public CollectionWithoutDuplicatesDC()
CollectionWithoutDuplicatesDC(IList<T>)
Initializes a new collection from existing list
public CollectionWithoutDuplicatesDC(IList<T> list)
Parameters
listIList<T>Initial list of items
CollectionWithoutDuplicatesDC(int)
Initializes a new collection with specified capacity
public CollectionWithoutDuplicatesDC(int count)
Parameters
countintInitial capacity
Methods
AddWithIndex(T)
Adds value with index, returns index of the value (existing or newly added)
public override int AddWithIndex(T value)
Parameters
valueTValue to add
Returns
- int
Index of the value in collection
Contains(T)
Checks if collection contains the specified value
public override bool? Contains(T value)
Parameters
valueTValue to check
Returns
- bool?
True if contains, false if not, null if value is null and nulls are not allowed
IndexOf(T)
Gets index of the specified value, adds it if not present
public override int IndexOf(T value)
Parameters
valueTValue to find or add
Returns
- int
Index of the value in collection
IsComparingByString()
Determines if comparing by string representation
protected override bool IsComparingByString()
Returns
- bool
True if comparing by string