我知道这个属性应该在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