From the course: Visual Basic Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Work with the Console class

Work with the Console class - Visual Basic Tutorial

From the course: Visual Basic Essential Training

Start my 1-month free trial

Work with the Console class

- [Instructor] We'll modify the code to use more of the console class. The first modification is to remove the unused class and structure code. That'll make it easier to see what's happening in the module. On line three, I'm currently using the console.writeline method. This prints out the day of the week text and moves to a new line. To output a partial line, we can use the write method. I'll put that right above the existing console like that. The way this works is console.write writes out a partial Y, this phrase "today is ... space." Then it finishes. The next line, line four, prints out the day of the week on the same line in the console and then returns to a new line. Next, let's change a value on the console. Rather than call a method, we'll set a property on the console class. In other words, we'll change some of the data that is stored inside the console class and replace it with values that are important…

Contents