VS Intellisense:您可以隐藏扩展方法吗? [英] VS Intellisense: can you hide extension methods?

查看:99
本文介绍了VS Intellisense:您可以隐藏扩展方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,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?

推荐答案

不是我知道的-但是您可能想要做的一件事就是摆脱.那时,扩展方法将无法使用,我相信,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屋!

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