In a code example:
int age;
...
age = (int)Convert.ToInt32(Console.ReadLine());
I see no point to put (int)
before conversion. Can I safely remove it to:
age = Convert.ToInt32(Console.ReadLine());
There are the same cases, such as:
height = (double)Convert.ToDouble(Console.ReadLine());