I have created some classes and in one instance, I want the programme to read the answer (numeric). I have tried to set the class as string and as int but continue to have problems. Please bear with me I am just starting to learn programming.
public **int** Age { get; set; }
Animal cuddle = new Animal();
cuddle.Color = "";
cuddle.Age = 0;
cuddle.Name = "";
cuddle.Type = "";
Console.WriteLine("Hi, {0} How old do you want your {1,2} to be?\n Remember, if your {3} is older then 5 you will have to give her double!!!", name, cuddle.Color, player);
cuddle.Age = **Console.ReadLine**();
if (cuddle.Age < 5)
{
In this instance it doesn't accept the Console.ReadLine.
If I change the int to string as:
public **string** Age { get; set; }
then it doesn't accept
if (**cuddle.Age < 5**)
I have tried without the brackets and/or with (**cuddle.Age = < 5**)