Show more specific information on your domain or dto object in a collection while debugging your C# code in visual studio
How often does it happens, when you would like to get more specific details on several of your object properties in a collection during debugging while clicking on the collection? For me a hell of a lot of times!
We've all been there, drilling down that endless object list while debugging, accidentally clicking next to the box so we have to start all over again - Benjamin Todts
Here is a trick which already exists since .net Framework 3.0
[DebuggerDisplay("{ID}", Name = "{Name}")]
public class Code {
public int ID { get; set; }
public string Name { get; set; }
}
Which results in:
Find out all details at msdn:
https://msdn.microsoft.com/en-us/library/x810d419.aspx
Fill in the form below and we’ll get back to you as soon as possible.
Oops. You seem to have written your full name in invisible ink. Please enter it so we can read it. Oops. You seem to have written your company in invisible ink. Please enter it so we can read it. It seems your e-mail doesn’t exist. Please enter a real one so we can contact you. Oops. You seem to have written your telephone in invisible ink. Please enter it so we can read it. Sorry, we could not send the enquiry.