title: C#: recursive search in two different data structures
body: <p>I need to perform a search in two different data structures in C#, and here's the deal:
  I have one name (which is a string) and I want to perform a search. I have a function called <code>Exists</code> which will return a <code>bool</code> indicating whether it exists or not.</p>
  
  <p>In case it exists, I increase the name (simply adding a 1 at the end of the string), and then I need to perform the search again (via method <code>exists</code>) to see if an object with the new name exists. </p>
  
  <p>This would go on until there's an unused name, which I could use, BUT, in case it doesn't exist, now I should perform a search another data structure which contains the objects that were deleted, and if the string is found there, then I'd have to increase the name again, and start searching since the beginning. 
  This would all end in case there's no object with such name neither using <code>Exists</code> method nor in the data structure where all the deleted objects are.</p>
  
  <p>How could I approach this problem?</p>
  
  <p>I hope I expressed myself clearly :-)</p>
  
  <p>Thanks a lot in advance!</p>