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 strings - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Work with strings
- [Instructor] The string is one of the most common types use in programming Visual Basic applications. It is implemented as a .NET type, and easily available in your VB code. It's full of interesting properties and methods. We could spend an hour or more exploring its features. Since time is limited, I've pre written the demo code. Let's take a quick look at some of the interesting aspects. We'll start by looking at how to create a string variable. One of the easiest ways to do it is shown here on line seven. You declare it with the Dim keyword, you give it an identifier, and then you assign a string. String literals in VB use a double quote on either end of the text. This is implicitly typing it to a string. If you want to be explicit, use the as string. Next we're going to look at a constructor. Constructors are methods that are part of a class that is called when you instantiate a new object. So in VB use the new…
Contents
-
-
-
-
-
-
-
-
-
Work with variables and constants4m 56s
-
(Locked)
Use the Code Explorer project1m 59s
-
(Locked)
Declare a variable6m 30s
-
(Locked)
Tips to make literals pop in the editor2m 34s
-
(Locked)
Work with custom and built-in constants3m 54s
-
(Locked)
Understand variable scope5m 42s
-
(Locked)
Understand numeric to numeric conversions5m 54s
-
(Locked)
Convert numeric values5m 43s
-
(Locked)
Convert and format numbers to string6m 39s
-
(Locked)
Convert and parse string to numbers5m 59s
-
(Locked)
Work with strings7m 11s
-
(Locked)
Work with dates and times9m 21s
-
(Locked)
Challenge: Strings, dates, and parsing52s
-
(Locked)
Solution: Strings, dates, and parsing2m 5s
-
-
-
-
-
-
-
-