C# Namespace Aliasing


Posted

in


This is too cool.  Sam Gentile gets the scoop from John Lam:

using Channels = System.Runtime.Remoting.Channels;

This is really nice if you have namespace conflicts and need to disambiguate your type references, or if you’re from the school of thought that says that you must always use fully qualified type names, but don’t want to obscure your code with giant namespace references.

This is a great little tip.  I am in the process of committing this to memory.