locked
Exam 70-536 - ToString() and boxing RRS feed

  • Question

  • In the exam questions on the CD i got the question:

    "Structures inherit ToString from System.Object. Why would someone override that method within a structure?"

    The correct answer is: "To avoid boxing".

    Now i know what boxing is and when it occours, but how would overriding the ToString avoid boxing? ToString gives the name of the structure, and therefore creates a string, the structure is still the same structure and stays unmodified?

     

    Friday, October 2, 2009 11:05 AM

Answers