String Basics

The .NET Framework finally brings a unified string definition to the multiple languages targeted at .NET. A string, as far as the Common Type System (CTS) is concerned, is just an array of Unicode characters. The .NET String class provides several methods that allow for easy comparison, concatenation, formatting, and general manipulation of strings.

Understanding the Immutability of Strings

The String class in .NET is immutable; in other words, the string itself is never modified. When characters or other strings are appended to a string, a new string is created as a result. The original string and the string to append are used to generate an entirely new string. Such immutability can cause a performance degradation for applications ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.