ConcurrentBagIn the above code, we have instantiated a new ConcurrentBag and added some integers using the Add method. Then, the ForEach method is called on the bag, which invokes an Action delegate that takes an input argument of the current item in the collection. In this case, the Action is simply printing out the item to the console. The package library for ConcurrentBag is part of the .NET Framework itself, and as such it doesn't have any dependencies on external package libraries.myBag = new ConcurrentBag (); for(int i=0; i<10; i++) { myBag.Add(i); } myBag.ForEach(num => Console.WriteLine(num));