When do we need to use [Browsable(true)]?

前端 未结 9 1174
清歌不尽
清歌不尽 2021-01-01 13:06

When do we need to use [Browsable(true)]?

EDIT (by SLaks): He\'s asking (I assume) why one would need to pass true as the

9条回答
  •  没有蜡笔的小新
    2021-01-01 13:49

    Probably when you want to make damn sure no one changes it :P

    // I want to see this, dont change it to false or I'll hunt you down...
    [Browsable(true)]
    public int MyProperty {
       get {
          // Insert code here.
          return 0;
       }
       set {
          // Insert code here.
       }
    }
    

提交回复
热议问题