c# Return value of function non-existent, when returning a dictionary
<p>I have an interesting problem, which is a function that returns a <code>Dictionary&lt;String,HashSet&lt;String&gt;&gt;</code>.  </p>

<p>The function converts some primitive structs to a Dictionary Class.</p>

<p>The function is called as follows:</p>

<pre><code>Dictionary&lt;String, HashSet&lt;String&gt;&gt; Myset = new Dictionary&lt;String,HashSet&lt;String&gt;&gt;();
Myset = CacheConverter.MakeDictionary(_myList);
</code></pre>

<p>Upon execution of the two lines above, Myset is non-existent to the debugger.  Adding a watch results in: </p>

<blockquote>
  <p>"The name 'Myset' does not exist in
  the current context"</p>
</blockquote>

<pre><code>public Dictionary&lt;String, HashSet&lt;String&gt;&gt; MakeDictionary(LightWeightFetchListCollection _FetchList) 
{
    Dictionary&lt;String, HashSet&lt;String&gt;&gt; _temp = new Dictionary&lt;String, HashSet&lt;String&gt;&gt;();
    // populate the Dictionary
    // return
    return _temp;    
}
</code></pre>

<p>The Dictionary <code>_temp</code> is correctly populated by the called function and <code>_temp</code> contains all the expected values.  </p>

<p>The problem seems to be with the dictionary not being returned at all.</p>

<p>Examples I could find on the web of functions returning primitive <code>Dictionary&lt;string,string&gt;</code> work as expected.</p>
