Visual Basic How To Only Allow Integer Inputs?
<p>I have a quick question about a problem and i'm sure you guys will find it very easy to solve but i'm having some trouble with it. I'm very new to using visual basic and I'm trying to restrict a user input so that it will only allow the user to input integers and wanted to ask if you guys could possibly give me an example piece of code on how to do this?</p>

<p>I have looked around for solutions to this problem however, they all seem to incorporate text boxs or are very complex and too difficult for me to understand</p>

<p>Here's the basics my input that I want to restrict to only integer inputs so you guys can see what I am trying to work with:</p>

<pre><code>Dim key As Integer
Console.Writeline("Please enter a number")
key = Console.ReadLine()
if key &gt; 1 do this...
if key &lt; 10 do this...
</code></pre>

<p>I appreciate any help you guys can provide for me :)</p>