Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [DebuggerDisplay("This person is called {Name} and is {AgeInYears} years old")]
- class PersonWithDebuggerDisplay
- {
- [DebuggerDisplay("{AgeInYears} years old")]
- public int AgeInYears { get; set; }
- public string Name { get; set; }
- }
- //Test
- [TestMethod]
- public void With()
- {
- var p = new PersonWithDebuggerDisplay
- {
- AgeInYears = 50,
- Name = "Sarah"
- };
- }
- // DebuggerDisplay can be applied to:
- //Classes
- //Structs
- //Delegates
- //Enums
- //Fields
- //Properties
- //Assemblies
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement