Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System.Diagnostics;
namespace DebuggerDisplay
{
class Program
{
static void Main(string[] args)
{
var person = new Person("Derek", "Comartin", "derek@codeopinion.com", "codeopinion");
}
}
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class Person
{
public string Firstname { get; }
public string Lastname { get; }
public string Email { get; }
public string Twitter { get; }
internal string DebuggerDisplay => $"{Firstname} {Lastname}";
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
You can’t perform that action at this time.