O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with Strings

Working with strings is one of the most common developer activities. In the .NET Common Type System, System.String is a reference type. This might be surprising, because actually strings behave like value types. Regarding this, there are a couple of things to say. First, the String class cannot be inherited, so you can’t create a custom class derived from it. Second, String objects are immutable like value types. What does this mean? It means that when you create a new String you cannot change it. Although you are allowed to edit a string’s content, behind the scenes the CLR will not edit the existing string; it will instead create a new instance of the String object containing your edits. The CLR then stores such String ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required