Useful Attributes in Visual Studio

 

For me , I like

 

 [DebuggerDisplay("FirstName={FirstName}, LastName={LastName}")] 

 

and

[DebuggerStepThrough] 

 

The code is the following:

 class Program { static void Main(string[] args) { var p = new Person(); p.FirstName = "Andrei"; p.LastName = "Ignat"; Console.WriteLine(p.Name()); //InternalsVisibleToAttribute //Obsolete //All Attributes: https://msdn.microsoft.com/en-us/library/system.attribute.aspx } } [DebuggerDisplay("FirstName={FirstName}, LastName={LastName}")] class Person { public string FirstName { get; set; } public string LastName { get; set; } [DebuggerStepThrough] public string Name() { return FirstName + " " + LastName; } } 

and the video is at https://youtu.be/ShBr1GgpZKs