What does the ConcurrentBag collection use: links or objects? Ie when TryTake, we delete the link to the object or copy the object, and then remove it from the collection.

  • 2
    links - for reference types, objects - in the case of value types - Igor
  • @Igor tobish if we add a class to this collection, then with TryTake we delete the link and get the link, right? I’m clarifying that for sure. Much depends on this. - Arantler
  • one
    Yes (13 characters are needed ...) - Igor
  • @Igor issue as an answer? Suddenly need someone else. - Arantler

1 answer 1

Like all other types of generic containers, ConcurrentBag operates with links - for reference types (classes), objects - in the case of value types (structures).