The C# team posts answers to common questions and describes new language features
Use the using directive to create an alias for a long namespace or class name. You can then use it anywhere you normally would have used that class or namespace. The using alias has a scope within the namespace you declare it in. Sample code:
using
// Namespace: using act = System.Runtime.Remoting.Activation; // Class: using list = System.Collections.ArrayList; ... list l = new list(); // Creates an ArrayList act.UrlAttribute foo; // Equivalent to System.Runtime.Remoting.Activation.UrlAttribute foo
[Author: Jon Skeet]
is there a way to build a new class which overrides the name of another class and makes it avaialble with a "new" name somehow?
I have a class library which I would like to give "prettier" names... but dont want to permanently rename them.
I think i figured out a solution now...
[amc.theatrelocations.net]
I an not a fan of the alias of classes. I believe that it just obfuscates the code. I understand that it is ok in the above references as you can see all the code in a single place.
I'D EXPECT SOME MODERATION HERE TO KILL OUT THE SPAM COMMENTS