O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

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

Self-Review Exercises

16.1 State whether each of the following is true or false. If false, explain why.

a) When strings are compared with ==, the result is true if the strings contain the same values.

b) A string can be modified after it’s created.

c) StringBuilder method EnsureCapacity sets the StringBuilder instance’s length to the argument’s value.

d) Method Equals and the equality operator work the same for strings.

e) Method Trim removes all whitespace at the beginning and the end of a string.

f) It’s always better to use strings, rather than StringBuilders, because strings containing the same value will reference the same object.

g) string method ToUpper creates a new string with the first letter capitalized.

16.2 Fill in the blanks in ...

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