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 built-in constants

Work with built-in constants

- [Narrator] Looking at some of the built-in constants. I'm going to break those into two categories. There's the constants that are part of .NET types, and then there's the constants that are part of the Visual Basic language. Let's look at the first category, which is constants that are part of a type. Here's an example, the Math class has a constant called PI. You can see when I hover over it, it says that is a constant, and it tells me that it's a double, and it gives me the numeric value for PI. There are several other constants available in the Math class. Now, one way you can filter this, when you're in Visual Studio, you get a suggested list of all of the members of this type. If you look at this symbol, this is the symbol for constant, this is the symbol for method. You can filter this list by clicking on these buttons. So if you click here, you're only looking at the methods. If you click here, you're looking at the constant. So there are three that are part of the math…

Contents