This is a very simple script I am trying to figure out and I have been looking for a simple answer and can't find it in the forums or in my C# book.
Console.Write("Enter a Number\n");
int input = Convert.ToInt32(Console.ReadLine()); //convert code to an integer
if (!Int32.IsNumber(input)) //if not a whole number input give an error
{
Console.WriteLine("Not an integer");
}
It's just that simple what I'm trying to do. This is a snippet from a bigger code.