CSharpFeeds - All your C# feeds in one place.

Wednesday, February 02, 2011

Tip : Override ToString() in Objects

by ssmith via Blog on 2/2/2011 3:46:00 PM

Most of your domain objects should override ToString() for the simple reason that if you ever want to simply display the object’s state, you shouldn’t need to implement a custom formatter for it.  Furthermore, it’s well-known that the default System.Object implementation of .ToString(), which outputs the type’s name, is useless 99% of the time.  Thus, it’s generally a good idea to implement .ToString() on your classes that have some kind of state, and to have your implementation presen ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us