Table of Contents

Class CollectionWithoutDuplicatesDC<T>

Namespace
SunamoDevCode._public.SunamoCollectionWithoutDuplicates
Assembly
SunamoDevCode.dll

Collection without duplicates implementation

public class CollectionWithoutDuplicatesDC<T> : CollectionWithoutDuplicatesBaseDC<T>

Type Parameters

T

Type 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

list IList<T>

Initial list of items

CollectionWithoutDuplicatesDC(int)

Initializes a new collection with specified capacity

public CollectionWithoutDuplicatesDC(int count)

Parameters

count int

Initial capacity

Methods

AddWithIndex(T)

Adds value with index, returns index of the value (existing or newly added)

public override int AddWithIndex(T value)

Parameters

value T

Value 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

value T

Value 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

value T

Value 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