 Hey everybody, this is Brian. If you've been paying attention, this is video number seven in our Visual Basic tutorial. Today we're going to be covering the SELECT statement. For this type dim color as String. And the SELECT statement, whoops, let's actually assign this variable. And let's say red. Now the SELECT statement takes a variable. In this case our variables name color and it's a String which we're calling red. It's just SELECT case, whoops, case. And then you have to give it the variable name in this case color. Notice how it gives an INSELECT. This is our SELECT statement. Now why do you need a SELECT statement? Let's say you want to compare this against say five other colors. And you want to do a specific thing depending on which one it is. We could do if then else, you know, five times, which would just be horrendous to look at. There's an easier way. It's called the SELECT statement. We're going to cover that right now. Case. And then you say different color blue. And after the case you have to give it an action. In this case we're going to say console.rightline. You entered blue. Well, we didn't enter anything. The color is blue. Trying to make this easy for you to follow along. Now that is treated as a SELECT case right there. So if the color is blue it's going to execute this. We're going to just copy that for the sake of speed. And we'll say color is white. And let's just say color is green. And finally, color is red. Now what happens here? As you can see this gets to be a massive statement. But it's actually much smaller than doing five different if than statements. And it gives you more control. You can actually do multiple lines in here. And do pretty much whatever you want. But for educational purposes we're just going to write a line in the console. So it's going to take the variable in this case color. You see here. And it's going to say is it blue? No. Okay. Jump to here. Is it white? No. Jump to here. Is it green? No. Jump to here. And let's actually add another one so you can see what happens here. And we'll say black. And in this case it's going to go no it's not blue. No it's not white. No it's not green. Yes it's red. Therefore do this. No it's not black. And then it's going to jump out of here. Let's run our work. See what happens. As you can see the color is red. When you change the variable we'll say green this time. Run it. The color is green. So once again what this is doing is it takes a variable. In this case green. And it's saying select case. And it highlights all the cases where color is. Is it blue? No. Is it white? No. Is it green? Yes it's green. Therefore it's going to execute this statement. It's actually pretty simple once you break it down. This is a very handy tool in your arsenal. So be sure to practice it. And learn what it does. Well I'm going to cut this tutorial a little bit short. And thank you for watching. I hope you found this educational and entertaining. And let me know if you liked this. Thanks. Bye.