O'Reilly logo

CLR via C#, Fourth 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

The System.String Type

Constructing a String Efficiently

Obtaining a String Representation of an Object: ToString

Parsing a String to Obtain an Object: Parse

Encodings: Converting Between Characters and Bytes

Secure Strings

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, I’ll show you how to perform various ...

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