Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created October 12, 2016 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/d589204769d4a10a7359c223fbf7f910 to your computer and use it in GitHub Desktop.
Save dcomartin/d589204769d4a10a7359c223fbf7f910 to your computer and use it in GitHub Desktop.
using System.Diagnostics;
namespace DebuggerDisplay
{
class Program
{
static void Main(string[] args)
{
var person = new Person("Derek", "Comartin", "derek@codeopinion.com", "codeopinion");
}
}
[DebuggerDisplay("{Firstname} {Lastname}")]
public class Person
{
public string Firstname { get; }
public string Lastname { get; }
public string Email { get; set; }
public string Twitter { get; set; }
public Person(string firstname, string lastname, string email, string twitter)
{
Firstname = firstname;
Lastname = lastname;
Email = email;
Twitter = twitter;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment