ASP.net隐藏属性

时间:2010-10-28 14:34:08

标签: asp.net debugging

我有一个班级声明

public class Customer
{

  public string id {  get;set;}
  public Address CustomerAddress   { get;set;}
  ...
  ...
  ...
  public string EmailAddress {get;set;}
  ..
  ..
  ..
}

debugging期间我想隐藏某些属性,如(id,CustomerAddress),实现它的方法是什么?

1 个答案:

答案 0 :(得分:1)

使用

System.Diagnostics.[DebuggerBrowsable(DebuggerBrowsableState.Never)]

(即)

[DebuggerBrowsable(DebuggerBrowsableState.Never)]
public Address CustomerAddress   { get;set;}