Associate an Alias with a Namespace C# with Example



Associate an Alias with a Namespace C# with Example

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(); 
 

0 Comment's

Comment Form

Submit Comment