1.

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.

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.



Discussion

No Comment Found