Program
, with a single method, Main
, that takes a String array as an argument:Main
is the application entry point, the method that's called automatically by the runtime when it launches the application. Any command-line arguments supplied when the application is launched are available in the args
array.Main
method, which is the line that calls Console.WriteLine
, with the following code:name
. It also retrieves the value of the DateTime.Now property, which contains the current local time, and assigns it to a variable named date
. And it displays these values in the console window. Finally, it displays a prompt in the console window and calls the Console.ReadKey(Boolean) method to wait for user input.n
represents a newline character.$
) in front of a string lets you put expressions such as variable names in curly braces in the string. The expression value is inserted into the string in place of the expression. This syntax is referred to as interpolated strings.