如何隐藏公共方法或属性以使其不显示在Intellisense [C#] [.Net]中 [英] How to Hide public methods or property from showing in Intellisense [C#][.Net]

查看:75
本文介绍了如何隐藏公共方法或属性以使其不显示在Intellisense [C#] [.Net]中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hello Codeproject
如何隐藏类库中的类的一种方法以使其不在Intellisense中显示?

我尝试了 [EditorBrowsable(EditorBrowsableState.Never)]
但是仅当我们从解决方案中卸载类库项目并添加.dll作为参考时,它才起作用

还有其他方法可以从Intellisense隐藏公共属性和方法吗?


任何帮助将不胜感激

问候
Salam

hello Codeproject
How can I hide one method of a class Inside a class Library from showing in Intellisense??

I tried
but it only work when we unload the Class library project from the solution and add the .dll as reference

Is there any other way to hide public properties and methods from Intellisense?


any Help will be Appreciated

Regards
Salam

推荐答案

这实际上是设计使然,因为您是库的设计者/程序员,而不是最终用户.您实际上自己为此找到了解决方案,使该库成为一个单独的项目,并在您的主项目中引用了该dll.
This is actually by design, as you are the designer/programmer of the library, and not the end user. You actually hit the solution for this yourself, make the library a separate project, and reference the dll in your main project.


这篇关于如何隐藏公共方法或属性以使其不显示在Intellisense [C#] [.Net]中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆