VS Intellisense:您可以隐藏扩展方法吗? [英] VS Intellisense: can you hide extension methods?
问题描述
默认情况下,Visual Studio在智能感知中显示类型的所有成员及其扩展方法.
By default Visual Studio displays all members and its extension methods for a type in intellisense.
有时候,我想隐藏扩展方法,以使其更容易找到我实际正在寻找的成员(尤其是在使用Linq时).
Sometimes I would like to hide the extension methods to make it easier to find the member I am actually looking for (especially when using Linq).
是否存在快捷方式或其他方式来仅显示智能感知中的某个类型的成员?
Is there a shortcut or another way to display only the members of a type in intellisense?
推荐答案
不是我知道的-但是您可能想要做的一件事就是摆脱
Not that I'm aware of - but one thing you might want to do is get rid of the using directive for System.Linq
. At that point the extension method won't be accessible, and I believe it won't be offered by Intellisense.
显然,如果您想从一个类的某个代码中使用LINQ,而不是在另一个代码中使用LINQ,那是不好的-但是对于完全不使用LINQ的类,这可能会有所帮助.
Obviously that's no good if you want to use LINQ from one bit of code in a class, but not in another - but for classes which aren't using LINQ at all, it might help you.
这篇关于VS Intellisense:您可以隐藏扩展方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!