Skip to content

Instantly share code, notes, and snippets.

@chestercodes
Created March 24, 2016 23:30
Show Gist options
  • Save chestercodes/5982c42200edc8962ccb to your computer and use it in GitHub Desktop.
Save chestercodes/5982c42200edc8962ccb to your computer and use it in GitHub Desktop.
using System.Diagnostics;
namespace Examples.DebuggerDisplayTestData
{
[DebuggerDisplay("{ToDisplay}")]
public class SimpleClass
{
public string SomeString { get; set; }
public bool SomeBool { get; set; }
public int SomeInt { get; set; }
public string ToDisplay => $"new SimpleClass(){{ " +
$"{nameof(SomeString)} = |{SomeString}|, " +
$"{nameof(SomeBool)} = {SomeBool.ToString().ToLower()}, " +
$"{nameof(SomeInt)} = {SomeInt}, " +
$"}}";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment