title: HashTable compile error (missing a cast?)
body: <p>im creating a feature in my app that will re create the CTRL+Z thing. i got few textboxs and i made a table like this:</p>
  
  <p><code>hashtable textChanges[obj.Name, obj.Text] = new HashTable(50);</code></p>
  
  <p>im having problem extractthe value from a chossen key. im getting the key afther the keyDown is fired.</p>
  
  <p>in the event im looking for the control with focus, and use his name to extract the last value the he enter the table.</p>
  
  <p>this is the event code:</p>
  
  <pre><code> private void Form1_KeyDown(object sender, KeyEventArgs e)
      {
          if (e.Control &amp;&amp; e.KeyData == Keys.Z)
          {
              for (int i = 0; i &lt; this.Controls.Count; i++)
              {
                  if (this.Controls[i].Focused)
                  {
                      if (this.Controls[i].GetType() == typeof(TextBox))
                      {
                          TextBox obj = (TextBox)this.Controls[i];
                          obj.Text = textChanges[obj.Name]; // &lt;--- compile error
                         //Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)   
  
                      }
                  }
              }
          }
      }
  </code></pre>
  
  <p>this is how i add keys &amp; value to the HashTable</p>
  
  <pre><code>private void textBox_OnTextChange(object sender, EventArgs e)
      {
          if (sender.GetType() == typeof(TextBox))
          {
              TextBox workingTextBox = (TextBox)sender;
              textChanges.Add(workingTextBox.Name, workingTextBox.Text);
          }
  
          if (sender.GetType() == typeof(RichTextBox))
          {
              RichTextBox workingRichTextBox = (RichTextBox)sender;
              textChanges.Add(workingRichTextBox.Name, workingRichTextBox.Text);
          }
      }
  </code></pre>
  
  <p>why do i get missing a cast error?</p>
  
  <p>(sorry for my english)</p>