title: How to implement tryAdd multiple entries into concurrent dictionary?
body: <p>I have a concurrent dictionary which I am using it to do some thread-safe functionalities.</p>
  
  <p>For example I have the following code :</p>
  
  <pre><code>var  myConcurrenctDictionary= new ConcurrentDictionary&lt;int,int&gt;();
  if (myConcurrenctDictionary.TryAdd(personId, personId) == false)
  {
      throw new Exception("");
  }
  </code></pre>
  
  <p>But now I need a thread-safe way to try adding multiple values to the concurrent dictionary at once, which returns false and not inserting any values of the specified ids if it fails.</p>
  
  <p>So, could you please guide me to how I can implement that?</p>