Comparing an int value to an array, then display if value matches or does not match
<p>I am brand new to programming and was interested in C#. I am studying arrays and have to compare my variable (checkNum) to my array(myNums[10]). I read posts here and several other sites and saw how to compare but getting stuck on how to properly display the comparison as shown in my attempt with the if/else statement below:(I will continue to research, but would appreciate and nudges in the right direction. Not necessarily the answer as I am wanting to learn) :)</p>

<p>Here is my code:</p>

<pre><code>int[] myNums = new int[10];
int checkNum;
Console.WriteLine("Enter 10 numbers:");

for (int i = 0; i &lt; 10; i++)
{
    Console.Write("Number {0}: ", i + 1);
    myNums[i] = int.Parse(Console.ReadLine());
}
Console.WriteLine("You entered:");
foreach (int x in myNums)
{
    Console.Write("{0} ", x);
}
Console.ReadLine();

Console.WriteLine("Enter another number:");
checkNum = int.Parse(Console.ReadLine());
bool exists = myNums.Contains(checkNum);

if (checkNum == myNums[10])
{
    Console.WriteLine("Your number {0} is in the Array.", checkNum);
}
else
{
    Console.WriteLine(
        "Your number {0} does not match any number in the Array.",
        checkNum);
}
Console.ReadLine();
</code></pre>
