Is there a way to add multiple items to ConcurrentBag all at once, instead of one at a time? I don\'t see an AddRange() method on ConcurrentBag, but there is a Concat(). How
Concat
is an extension method provided by LINQ. It is an immutable operation that returns another IEnumerable
that can enumerate the source collection followed immediately by the specified collection. It does not, in any way, change the source collection.
You will need to add your items to the ConcurrentBag
one at a time.