Search code examples
c#usingusing-directives

What's this C# "using" directive?


I saw this C# using statement in a code example:

using StringFormat=System.Drawing.StringFormat;

What's that all about?


Solution

  • That's aliasing a typename to a shorter name. The same syntax can also be used for aliasing namespaces. See using directive.

    (Updated in response to Richard)