Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellisense for extension methods?

Is there a way to get intellisense for extension methods from classes that are not currently within the usings, but referenced in the solution. It would be great convenience to be able to just type and not have to add the using when using an extension method the first time in a class.

like image 775
Johan Larsson Avatar asked Oct 11 '12 22:10

Johan Larsson


1 Answers

I believe what you are looking for is the Import Symbol Creation with Re#. I use this all the time when accessing members that are not part of the current using statements. In essence, Re# will look through all your referenced assemblies and see if anything matches and then provide a list of those possible matches and import if needed.

Import Symbol Completion (formerly known as Type Name Completion) displays all types that match a given prefix regardless of what namespace they belong to (as opposed to Symbol Completion, which only completes names of currently visible types). Import Symbol Completion automatically inserts appropriate namespace import directives to the current file if a selected type has not been imported previously. It also works after dot with extension methods and puts necessary using directives.

The default Re# key mapping is Ctrl+Alt+space.

I'm not sure if I updated my mappings, but I have to use: Shift+Alt+space

like image 54
Metro Smurf Avatar answered Oct 20 '22 09:10

Metro Smurf