How can I prevent a public class that provides extension methods from appearing in Intellisense?

后端 未结 4 539
名媛妹妹
名媛妹妹 2021-01-21 08:57

Is there any way to \'hide\' the name of a class, whose sole purpose is to provide extension methods, from Intellisense?

I would like to remove the class name from the

4条回答
  •  灰色年华
    2021-01-21 09:23

    Ok, I have the answer to this. Hallgrim's suggestion of marking the class with..

    [EditorBrowsable(EditorBrowsableState.Never)]
    

    ..does actually work but only where the assembly is being referenced, rather than the project, as would be the case in my own VS solution whilst writing the assembly that provides the class. The extension methods are available as usual.

提交回复
热议问题