title: Returning a default value. (C#)
body: <p>I'm creating my own dictionary and I am having trouble implementing the <a href="http://msdn.microsoft.com/en-us/library/ms132143(VS.85).aspx" rel="noreferrer">TryGetValue</a> function.  When the key isn't found, I don't have anything to assign to the out parameter, so I leave it as is.  This results in the following error:  "The out parameter 'value' must be assigned to before control leaves the current method"</p>
  
  <p>So, basically, I need a way to get the default value (0, false or nullptr depending on type).  My code is similar to the following:</p>
  
  <pre><code>class MyEmptyDictionary&lt;K, V&gt; : IDictionary&lt;K, V&gt;
  {
      bool IDictionary&lt;K, V&gt;.TryGetValue (K key, out V value)
      {
          return false;
      }
  
      ....
  
  }
  </code></pre>