title: HashSet c# element in HashSet modify
body: <p>how is it possible to modify a element in HashSet?</p>
  
  <p>my HashSet looks like:</p>
  
  <pre><code>HashSet&lt;int&gt; mynumbers = new HashSet&lt;int&gt;();
  mynumbers.Add(rnd.Next(1, 11));
  mynumbers.Add(rnd.Next(1, 11));
  </code></pre>
  
  <p>the output can be done with:</p>
  
  <pre><code>Console.WriteLine( mynumbers.ElementAt(0) + "and" + mynumbers.ElementAt(1));
  </code></pre>
  
  <p>looks like for example:</p>
  
  <p>2 and 10</p>
  
  <p>but how can i now modify the first value in the HashSet. </p>
  
  <p>this is not possible:</p>
  
  <pre><code>mynumbers.ElementAt(0) = 1; 
  </code></pre>