One thing a developer does all the time is debugging code, very obvious. At times the value of property or output of a method you are interested in might be deep inside a class. While debugging you would frequently add them to quick watch window or pin (bookmark) them to reach out quickly. One productivity tip is that you can use DebuggerDisplay on entities to make it quickly accessible while debugging. Let's take a simple class as example: namespace DebuggerDisplaySample { using System; using System.Diagnostics; using System.Globalization; public class Program { public static void Main(string[] args) { var programInstance = new Program(); programInstance.LastSavedDateTime = DateTime.ParseExact( "21-05-1985 12:12 PM", "dd-MM-yyyy hh:mm tt", CultureInfo.InvariantCulture, DateTimeStyles.None); Console.ReadLine(); } public DateTime LastSavedDateTime { get; set; } } } Here when you debug and hover on the programInstance or pin it (bookmark) it will show you the full name of the class as DebuggerDisplaySample.Program. » Read more

 Jsinh        

For all those important methods of your application where you would like to / have check an input parameter or output result for null / empty check. In case you don't want those checks while you release and only want them to be break into debug or pause while debugging - Debug.Assert is your friend. Let say we have a method that takes string as input: private void SomeMethodAbc(string someInput) { //// TODO: Doing something in here !! } What you want is to validate that someInput is not null, empty or whitespace. But you know your input well and sure that it won't be null, empty or whitespace in production. So in that case you just require this check for debug or development purpose. You can use Debug class from System.Diagnostics and its method Assert to achieve that. When you add a Debug.Assert and the provided condition evaluate to false - » Read more

 Jsinh