Constructors
-
Concurrent
Bag`1() Initializes a new instance of the ConcurrentBag`1 class. -
Concurrent
Bag`1(IEnumerable<`0>) Initializes a new instance of the ConcurrentBag`1 class that contains elements copied from the specified collection.
Methods
- Add(`0) Adds an object to the ConcurrentBag`1.
- Clear() Removes all values from the ConcurrentBag`1.
-
Copy
To(`0[], sealed Copies the ConcurrentBag`1 elements to an existing one-dimensional Array, starting at the specified array index.Int32) -
Get
Enumerator() sealed Returns an enumerator that iterates through the ConcurrentBag`1. -
To
Array() sealed Copies the ConcurrentBag`1 elements to a new array. -
Try
Peek(`0&) Attempts to return an object from the ConcurrentBag`1 without removing it. -
Try
Take(`0&) sealed Attempts to remove and return an object from the ConcurrentBag`1.
Properties
- Count sealed Gets the number of elements contained in the ConcurrentBag`1.
-
Is
Empty Gets a value that indicates whether the ConcurrentBag`1 is empty. -
System.
Collections. privatesealed Gets a value indicating whether access to the ICollection is synchronized with the SyncRoot.ICollection. Is Synchronized -
System.
Collections. privatesealed Gets an object that can be used to synchronize access to the ICollection. This property is not supported.ICollection. Sync Root