C# (Sharp) Programming Language Question:
Download Job Interview Questions and Answers PDF
Can I define a type that is an alias of another type (like typedef in C++)?
Answer:
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.
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.
Download C# (Sharp) Programming Language Interview Questions And Answers
PDF
Previous Question | Next Question |
How do I port "synchronized" functions from Visual J++ to C#? | Is it possible to have different access modifiers on the get/set methods of a property? |