C# Language Using Directive Using alias directives

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

You can use using in order to set an alias for a namespace or type. More detail can be found in here.

Syntax:

using <identifier> = <namespace-or-type-name>;

Example:

using NewType = Dictionary<string, Dictionary<string,int>>;
NewType multiDictionary = new NewType();
//Use instances as you are using the original one
multiDictionary.Add("test", new Dictionary<string,int>());


Got any C# Language Question?