title: How do you check if a integer is in an array?
body: <p>this is an example of the code I created </p>
  
  <pre><code>int[] Numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  </code></pre>
  
  <p>What I would like to do is is a small script that can check if a number is in the array and return a boolean for example 3 would return true and 13 would return false otherwise the only way i can think of is this</p>
  
  <pre><code>if ((UserInput == Numbers[0]) || (UserInput == Numbers[1]) || (UserInput == Numbers[2]) || (UserInput == Numbers[3]))
  </code></pre>