Answers

Question and Answer:

  Home  C# (Sharp) Programming Language

⟩ Can I define a type that is an alias of another type (like typedef in C++)?

Not exactly. You can create an alias within a single file with the "using" directive: using System; using Integer = System.Int32; // alias

But you can't create a true alias, one that extends beyond the file in which it is declared. Refer to the C# spec for more info on the 'using' statement's scope.

 141 views

More Questions for you: