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.
String creation with StringBuilder - Visual Basic Tutorial
From the course: Visual Basic Essential Training
String creation with StringBuilder
- [Instructor] We've seen how to compose strings using concatenation and interpolation. However, repeatedly modifying a string with operations like concatenation can lead to inefficient memory usage and slower performance, because strings in .net are immutable. In this video, we'll explore the string builder class, a tool specifically designed for efficient string manipulation. Before I get started, let's talk about all these xaml files that are in this project. Up until this point in the chapter, we've been working with the code in MainWindow.xaml But as you can see, I've got other files here. When you click on debug start debugging in a WPF application, it launches the startup item, which by default is main window. But for this example, we want to use string builder window. To change that, you go to application.xaml, and you change the startup URI to the name of the xaml file. In this case, string builder window. Okay, let's go take a look at the code then for this. Let's start by…
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)
-
-
-
-
-
-
-
-
-
-
-