Chapter 16. Strings and Characters

This chapter describes the C# support for characters and strings. We start with the char type, which represents a single character, before moving on to strings, which represent a sequence of characters. We will see how literals can be used to define char and string values, how to perform operations on both types, and the members that are available in the char struct and the string class to make working with these types simpler.

We will finish this chapter by looking at the composite formatting feature, which allows you to embed format items into strings that are later replaced with string representations of objects and values. This is a powerful feature that you will use in almost every program you write using ...

Get Introducing Visual C# 2010 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.