O'Reilly logo

CLR via C#, 3rd Edition 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

Chapter 14. Chars, Strings, and Working with Text

In this chapter:

Characters 327

The System.String Type 330

Constructing a String Efficiently 346

Obtaining a String Representation of an Object: ToString 350

Parsing a String to Obtain an Object: Parse 359

Encodings: Converting Between Characters and Bytes 361

Secure Strings 369

In this chapter, I'll explain the mechanics of working with individual characters and strings in the Microsoft .NET Framework. I'll start by talking about the System.Char structure and the various ways that you can manipulate a character. Then I'll go over the more useful System.String class, which allows you to work with immutable strings. (Once created, strings can't be modified in any way.) After examining strings, ...

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