O'Reilly logo

Applied Microsoft® .NET Framework Programming by Jeffrey Richter

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

The System.String Type

Certainly, one of the most used types in any application is System.String. A String represents an immutable ordered set of characters. The String type is derived immediately from Object, making it a reference type. (No string ever lives on a thread’s stack.) The String type also implements several interfaces (IComparable, ICloneable, IConvertible, and IEnumerable).

Constructing Strings

Many programming languages (including C#) consider String to be a primitive type—that is, the compiler lets you express literal strings directly in their source code. The compiler places these literal strings in the module’s metadata, and they are accessed at run time using a mechanism called string interning (which I’ll talk about later in ...

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