[DebuggerDisplay]
can be really helpful to quickly see customized output of a Type when you mouse over the instance of the Type during debugging.
(在调试期间将鼠标悬停在Type的实例上时, [DebuggerDisplay]
对于快速查看Type的自定义输出非常有用。)
example: (例:)
[DebuggerDisplay("FirstName={FirstName}, LastName={LastName}")]
class Customer
{
public string FirstName;
public string LastName;
}
This is how it should look in the debugger:
(这是它应该在调试器中查看的方式:)
Also, it is worth mentioning that [WebMethod]
attribute with CacheDuration
property set can avoid unnecessary execution of the web service method.
(另外,值得一提的是,具有CacheDuration
属性集的[WebMethod]
属性可以避免不必要的Web服务方法的执行。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…