title: How to move object between dictionaries?
body: <p>I have simple task where I need to check objects in one dictionary and if certain criteria met move to another. What I am asking if there is some good pattern where I can use language feature to achieve that. The straight approach is simple - use temporaty collection, first step determine canditates, second step do actual move. It is ok but it is not cool.</p>
  
  <p>Current code</p>
  
  <pre><code>class Order
  {
    public int ID;
    public bool IsReady;
  }
  
  Dictionary&lt;int, Order&gt; ActiveDictionary;
  Dictionary&lt;int, Order&gt; ProcessedDictionary;
  
  public Update()
  {    
   // temporary list, uncool
   List&lt;Order&gt; processed = new List&lt;Order&gt;();
  
  
   // fist step
   foreach(Order ord in ActiveDictionary)
   {
    if(ord.IsReady)
    {
      processed.Add(ord);
    }
   }
  
   // ok now lets move
   foreach(Order ord in processed)
   {
    ActiveDictionary.Remove(ord.ID);
    ProcessedDictionary.Add(ord.ID, ord);
   }
  }
  </code></pre>