title: Need to convert a value from a textbox to an Integer
body: <p>I need help in the following;</p>
  
  <p>This is the cmd-let</p>
  
  <pre><code>Set-Datastore [-Datastore] &lt;Datastore[]&gt; [[-Name] &lt;String&gt;] [-CongestionThresholdMillisecond &lt;Int32&gt;]
  </code></pre>
  
  <p>I have a textbox which will be used with '-CongestionThresholdMillisecond' parameter. I have tired different ways but either get cannot convert string to int or value is less than 5 (not permitted).</p>
  
  <pre><code>$textBox417.Size = New-Object Drawing.Size (80,30)
  $textBox417.Location = New-Object System.Drawing.Size (100,140)
  $int = $textBox417.Value.ToString() 
  $button = New-Object System.Windows.Forms.Button
  $button.Size = New-Object Drawing.Size (110,30)
  $button.Location = New-Object System.Drawing.Size (50,180)
  $button.add_click({Set-Datastore -Name $label438.Text -CongestionThresholdMillisecond $int})
  </code></pre>
  
  <p>Help much appreciated!</p>