How to hide public methods from IntelliSense

前端 未结 3 1181
暖寄归人
暖寄归人 2020-11-29 04:44

I want to hide public methods from the IntelliSense member list. I have created an attribute that, when applied to a method, will cause the method to be called when its obj

3条回答
  •  青春惊慌失措
    2020-11-29 04:49

    Using the EditorBrowsable attribute like so will cause a method not to be shown in IntelliSense:

    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    public void MyMethod()
    {
    }
    

提交回复
热议问题