Class OrderedSet<T>
A HashSet which retains order of items as they are added or inserted.
or
A List which only contains unique references.
Inheritance
OrderedSet<T>
Syntax
public class OrderedSet<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Properties
Count
Declaration
public int Count { get; }
Property Value
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
Item[Int32]
Declaration
public T this[int index] { get; set; }
Parameters
| Type |
Name |
Description |
| Int32 |
index |
|
Property Value
Methods
Add(T)
Declaration
Parameters
| Type |
Name |
Description |
| T |
item |
|
AddRange(IEnumerable<T>)
Declaration
public void AddRange(IEnumerable<T> objectReferences)
Parameters
Clear()
Declaration
Contains(T)
Declaration
public bool Contains(T item)
Parameters
| Type |
Name |
Description |
| T |
item |
|
Returns
CopyTo(T[], Int32)
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
| Type |
Name |
Description |
| T[] |
array |
|
| Int32 |
arrayIndex |
|
GetEnumerator()
Declaration
public IEnumerator<T> GetEnumerator()
Returns
IndexOf(T)
Declaration
public int IndexOf(T item)
Parameters
| Type |
Name |
Description |
| T |
item |
|
Returns
Insert(Int32, T)
Declaration
public void Insert(int index, T item)
Parameters
| Type |
Name |
Description |
| Int32 |
index |
|
| T |
item |
|
Remove(T)
Declaration
public bool Remove(T item)
Parameters
| Type |
Name |
Description |
| T |
item |
|
Returns
Remove(IList<T>)
Declaration
public void Remove(IList<T> items)
Parameters
| Type |
Name |
Description |
| IList<T> |
items |
|
RemoveAt(Int32)
Declaration
public void RemoveAt(int index)
Parameters
| Type |
Name |
Description |
| Int32 |
index |
|