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

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