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.
Concatenation and interpolation - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Concatenation and interpolation
- [Instructor] To compose a string means to create a single string by combining multiple pieces of text variables or values. There are various ways to accomplish this. We'll start by linking at concatenation. First, let's look at, take a look at my UI. So I have these two text boxes up here. This one is called TextBox, or I should say TeamATextBox. And this one, its name is TeamBTextBox. So my goal is to grab the strings that are in those text boxes. That's what I'm doing on line 40 and 41. Then I'm going to combine those together. The first technique is using the oldest weight of concatenating a string, and that is using these operators, the plus operator or the ampersand operator, they're equivalent. So you can use either one. So I start by creating a string literal, that's what's here at the beginning, and then I terminate that literal, and then I take this variable and I concatenate it to the end, and then I take the next string literal and concatenate that to this variable and so…
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Understanding strings6m 41s
-
(Locked)
Create string variables4m
-
(Locked)
Concatenation and interpolation2m 56s
-
(Locked)
Search string contents2m 59s
-
(Locked)
Modify string contents3m 3s
-
(Locked)
String creation with StringBuilder5m 39s
-
(Locked)
Compare and equals5m 51s
-
(Locked)
Convert and format numbers to strings8m 4s
-
(Locked)
Implicit covert strings to numbers2m 50s
-
(Locked)
Use Parse and TryParse conversions5m 4s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-