Answers to Self-Review Exercises

  1. 16.1

    1. True.

    2. False. strings are immutable; they cannot be modified after they’re created. StringBuilder objects can be modified after they’re created.

    3. False. EnsureCapacity simply ensures that the current capacity is at least the value specified in the method call.

    4. True.

    5. True.

    6. False. StringBuilder should be used if the string is to be modified.

    7. False. string method ToUpper creates a new string with all of its letters capitalized.

  2. 16.2

    1. +, Append, Concat.

    2. AppendFormat

    3. ArgumentOutOfRangeException.

    4. currency.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset