From the course: Visual Basic Essential Training

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Work with the console class

Work with the console class

- [Instructor] I've modified the code. I removed the hello world line, and I've added four extra lines of code or additional lines of code. We're working with the console class. We'll learn more about this as we go through the course, but I'm just using two methods, write line and read line. So write line is outputting this question, and then read line is waiting for the user to type some information and press enter. Once the user presses enter, then the information is placed in this variable. This is a string variable. Then on the next line, I write out a combination or a concatenation of those strings. So here's the first string. There's the variable, and there's the third string, question mark. And in VB, the ampersand is the concatenation operator. And then here on the last line, I'm calling console.readline again. Now notice this time I'm not storing the data that the user enters in any variable. What that means is the app will wait on this line of code until the user presses…

Contents