Class ThreadSafeGenericList<T>
This class is a thread-safe, generic (template based) List class.
This class does not support enumerating the list elements or an index operator. To enumerate the current items in the list or to get an element at an index position, call the ToArray() method then perform the desired action on the array of current items.
Inherited Members
Namespace: SipLib.Collections
Assembly: SipLib.dll
Syntax
public class ThreadSafeGenericList<T>
Type Parameters
Name | Description |
---|---|
T | The Type of the objects in the List. |
Properties
| Edit this page View SourceCount
Gets the number of items in the list.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceAdd(T)
Adds a new item to the list.
Declaration
public void Add(T NewItem)
Parameters
Type | Name | Description |
---|---|---|
T | NewItem |
Clear()
Clears the list.
Declaration
public void Clear()
Remove(T)
Removes an element from the list if its present
Declaration
public void Remove(T Element)
Parameters
Type | Name | Description |
---|---|---|
T | Element |
ToArray()
Converts the list to an array.
Declaration
public T[] ToArray()
Returns
Type | Description |
---|---|
T[] | Returns a new array containing all of the items |