C#C
C#4y ago
gr8stalin

scope of using statements and extension methods

i want to encapsulate some logic for a specific type i have into an extension method. however, when i try to find that extension method on the type with intellisense, it doesn't appear in the list.

when i enter the method name by hand and press the intellisense shortcut, it prompts me to add a using statement for the namepsace i added the extension method to. i do have that namespace in a using method, but i have it as an alias like so:

using CustomService = MyProject.Services.CustomService;


does this not count for having the namespace in the current scope?
Was this page helpful?