Created
January 15, 2015 19:46
-
-
Save controlflow/be428287b7e08c306559 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DebuggerDisplay("Person(Name={" + nameof(Name) + ",nq}, Age={" + nameof(Age) + ",nq})")] | |
// vs. | |
[DebuggerDisplay($"Person(Name={{{ nameof(Name) },nq}}, Age={{{ nameof(Age) },nq})")] | |
class Person { | |
public string Name { get; } | |
public int Age { get; } | |
public Person(string name, int age) { | |
this.Name = name; | |
this.Age = age; | |
} | |
public override string ToString() => $"Person(Name=\"{Name}\", Age=\"{Age}\")"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment