Char tryParse not working as I thought?
<p>I have some problem with a method that I have done in c#. I'm trying to stop user from entering anything else then y and n. It's almost working that I want, but user can still enter more than one sign, and then it doesn't work! How can I do to also check if char is more than one char? I thought the tryParse solved that? Thanks!</p>

<pre><code>// Method to check if item is food or not
    private void ReadIfFoodItem()
    {
        Console.Write("Enter if food item or not (y/n): ");

        if (char.TryParse(Console.ReadLine(), out responseFoodItem))
        {
            if(Char.IsNumber(responseFoodItem))
            {
                Console.WriteLine(errorMessage);
                ReadIfFoodItem();
            }
            else
            {
                // Set true or false to variable depending on the response
                if ((responseFoodItem == 'y' || responseFoodItem == 'Y'))
                {
                    foodItem = true;
                    selectedVATRate = 12; // Extra variable to store type of VAT
                }
                else if ((responseFoodItem == 'n' || responseFoodItem == 'N'))
                {
                    foodItem = false;
                    selectedVATRate = 25; // Extra variable to store type of VAT
                }
                else
                {
                    Console.WriteLine(errorMessage);
                    ReadIfFoodItem();
                }
            }
        }
    }
</code></pre>
