O'Reilly logo

Microsoft®C# Programming for the absolute beginner by Andy Harris

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

Investigating The String Object

The Pig Latin program manipulates text. As you recall from Chapter 1, “Basic Input and Output: A Mini Adventure,” most programmers, including those who program in C#, refer to text variables as strings. C# provides a special object called the String which manipulates text values in a number of ways. After you understand how a String object works and how it relates to text, you can capitalize the text, search for one phrase inside another, find out the length of the text, and many other things.

The String Mangler Program

The String Mangler program is a silly program that demonstrates ways you can fold, spindle, and mutilate an innocent string variable. I started by defining a string variable and then did some interesting ...

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