开发者

Visual Studio 2010 extension to add extension methods to intellisense even if the using statement isn't there

I've gotten used to adding using System.Linq; for IEnumerable extension methods, but there have been times when I've tried to use an extension method on a class and it didn't show up in intellisense and I spent way too much time trying to figure out what's wrong before realizing I just need a using statement that Visual Studio didn't find for me. Is there a VS2010 ext开发者_如何学运维ension that will find extension methods in the standard Ctrl + . View.ShowSmartTag feature?


Can't you just type the name of the extension method class, then do a Ctrl + . on it. I just tested that and it should work even if the namespace is different. Or are you wondering if there is a way to just type variable.Ext() and do ctrl + . period on that? Although I tested on VS 2012 so maybe that's why. I am not aware of any extension to automatically detect extension methods.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜