Demonstrate a using alias : using « Statement « C# / CSharp Tutorial






using System; 
 
// Create an alias for Counter.CountDown. 
using Count = Counter.MyClass; 
 
namespace Counter { 
  class MyClass { 
  } 
} 
 
class MainClass { 
  public static void Main() { 
    Count cd1 = new Count(); 
  } 
}








4.10.using
4.10.1.using
4.10.2.Demonstrate the using directive
4.10.3.Demonstrate a using alias
4.10.4.using alias directive
4.10.5.using Statement
4.10.6.IDisposable and the using Keyword