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 - Visual Basic Tutorial
From the course: Visual Basic Essential Training
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
-
-
-
-
-
-
-
-
(Locked)
Work with variables and constants8m 17s
-
(Locked)
Use the code explorer project3m 26s
-
(Locked)
Declare a variable5m 35s
-
(Locked)
Variables and .NET types3m 36s
-
(Locked)
Naming your variables2m 19s
-
(Locked)
Understand the variable scope: What code can access the variable4m 19s
-
How data conversion works7m 49s
-
(Locked)
Convert numeric values5m 35s
-
(Locked)
Create custom constants1m 29s
-
(Locked)
Work with built-in constants3m 36s
-
(Locked)
Work with enum values3m 45s
-
(Locked)
Create a custom enum1m 35s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-
-