For numeric as well as date calculations or string operations, it is important to have an understanding of expressions. The following line (see Figure 1-6) is a String expression. The ReadLine method returns a string (in this case, whatever text the user has entered via the keyboard) and assigns the result to the variable input.
input = Console.ReadLine()
Another example of an expression in the code in Figure 1-6 is the static Parse method of the Date data type, as shown here:
birthyear = Date.Parse(input)
By assigning this expression in this manner, the string, which represents the date, is converted into a true date type. Remember, it’s important to use the correct type in the correct place. A computer doesn’t ...