title: hashtable.ContainsKey never evaluates to true?
body: <p>I have the following code which reads an XML file, outputs the nodes and presents the user with a prompt to input a choice.  For some reason, no matter what I put in, it always says "Invalid Choice".  What am I doing wrong?</p>
  
  <pre><code>$buildsFile = [System.Xml.XmlDocument](Get-Content "$($config.remotebuildspath)/builds.xml");
  $builds = $buildsFile.builds;
  
  $i = 0
  $buildHash = @{}
  Write-Host "Available Builds: " -ForeGroundColor Green
  ForEach ($buildVersion in $builds.ChildNodes) {
      $i++
      Write-Host "(" -NoNewline  -ForeGroundColor Green
      Write-Host $i -NoNewline
      Write-Host ") $($buildVersion.LocalName)"  -ForeGroundColor Green
      $buildHash.add($i, $buildVersion.LocalName)
  }
  $isValid = $false
  do {
      Write-Host "Choose: " -NoNewline -ForeGroundColor Green
      $choice = Read-Host
      if ($buildHash.ContainsKey($choice)) {
          $isValid = $true
      } else {
          Write-Host "Invalid Choice!" -ForeGroundColor Red
          $isValid = $false
      }
  } while ($isValid -eq $false)
  Write-Host "You picked ${$buildHash[$choice]}"
  </code></pre>
  
  <p>Debugger screenshots:</p>
  
  <p><a href="https://i.stack.imgur.com/yaS9E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yaS9E.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/90011.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/90011.png" alt="enter image description here"></a></p>