How to remove a single, specific object from a ConcurrentBag<>?

后端 未结 9 502
误落风尘
误落风尘 2021-02-02 04:34

With the new ConcurrentBag in .NET 4, how do you remove a certain, specific object from it when only TryTake() and TryPeek() are

9条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-02 05:14

    As you mention, TryTake() is the only option. This is also the example on MSDN. Reflector shows no other hidden internal methods of interest either.

提交回复
热议问题