double number;
Console.Write("Enter the cost of the item: ");
while (!double.TryParse(Console.ReadLine(), out number))
{
   Console.Write("This is not valid input. Please enter an integer value: ");
}

By toihid