I'm sure I know the answer, but I wonder if there is a way to define a global "using" directive in my C # projects so that I don't have to repeat the directive on top of each code file.
My interest is really related to the implementation of extension methods in the .NET Framework. The only way to use the extension method is to define the use directive for the namespace containing the extension methods. Without using the directive, I lose Intellisense's capabilities for extension methods, which means that I will not always see which methods are available.
As a framework developer, make sure that the types and methods provided within the platform are clear and accessible for developers to use, are key to me. Although the documentation and training serve their purpose, I found that most developers will click the period and scroll through the Intellisense list to find out what methods and properties are available. Even if they go to the Object Browser or look at the help documentation, they will not know about the extension method if they do not know about it. This is where Intellisense comes in.
And, although I can add the using directive to the VS template, the Delete and Sort option in VS will remove the directive that refers to extension methods if it is not used.
So, all that is said, is there a way to define a global "using" directive in VS 2010? If not, is it likely that MS will be considered for the future?
Sonofffirate
source share