Associate an Alias with a Namespace

Download c# eBook


using st = System.Text;
//allows you to access classes within this namespace such as StringBuilder
//prefixing them with only the defined alias and not the full namespace.  i.e:

var sb = new st.StringBuilder();
//instead of
var sb = new System.Text.StringBuilder();


Contributors: 1
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial:

Download eBook