Using using for abbreviating type aliases

I have found a third use for C# using statement.

The first is for including namespaces, the second is shorthand for making use Dispose is called and the third is for naming types.

using Cache = Dictionary<string, KeyValuePair<string,string>();
Cache cache = new Cache();

As can be seen in the code above I have replaced a long type description with a short.

Honour thouse who should.


Tags: ,

Leave a Reply