6Working with Objects

6.1 The string Class

6.2 String Operations

6.3 Object Composition

6.4 Interfaces

6.5 Random Numbers and Simulation

I this chapter we go further into object-oriented programming. We introduce the powerful and useful string class from the .NET Framework library. Strings serve as an excellent illustration of various aspects of working with objects. After introducing string methods, we look at the assignment and comparison of string objects. This requires a careful discussion of the difference between reference variables and variables of primitive types. Although we use string objects in our illustrations, the discussion applies to all reference types.

One of the important features of classification is that it allows us to ...

Get Computing with C# and the .NET Framework, 2nd Edition 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.