Is there any way to generate a ToString()
using Visual Studio 2010?
I really don't want to do this by hand!
[EDIT]
I'm looking for a simple string representation of my model. In previous IDEs * ToString generation has been enabled in the UI using simple templates and field selection.
Currently default implementations of Equals and Hashcode are offered in a similar pattern. I'd hoped there was something similar for ToString.
It seems not by default - thanks for the responses!
(* this is my first .net project)
override
? If so then simply typeoverride
, space and selectToString
from the list - it will generate the method body for you. – AcetanilideEquals
? – Juliajulian