我知道這個屬性應該在C#中工作,但在我的情況下,它不會。 我有一個有懶人屬性的類兒童。訪問此屬性可能會帶來往返服務器的副作用。所以,當我在調試器監視窗口中觀看時,我不希望發生這種情況。 省略所有無關的細節源看起來很普通: [DebuggerDisplay("(Frozen) {m_children}")]
public IList<IEntityBase> Children
{
ge
考慮下面的類: [DebuggerDisplay("{GetType().Name,nq}: FileName = {FileName,nq}")]
public class FileWrapper
{
public string FileName { get; set; }
public bool IsTempFile { get; set; }
public
是否可以在DebuggerDisplay attribute內調用帶有參數的方法?我在MSDN文章Using the DebuggerDisplay Attribute中找不到有關此問題的有用信息。 我嘗試使用字符串參數"d"調用ToString方法;但以下不起作用: [DebuggerDisplay(@"{ToString(""d"")}")]
public class ...
我知道它建
現狀 有兩類: [DebuggerDisplay(@"One = {One}, two = {Two}")]
public class A
{
public int One { get; set; }
public B Two { get; set; }
}
[DebuggerDisplay(@"Three = {Three}")]
public class B
class A
{
public Color ColorA { get; set; }
public Color ColorB { get; set; }
public A(Color colorA, Color colorB)
{
ColorA = colorA;
ColorB = colorB;
}
pu