C++ typedef equivalent in C#

  • Thread starter Thread starter Guest
  • Start date Start date
George said:
Is there a C++ typedef equivalent in C#?

Not a "global" one, but you can use a using directive for a single
file:

using FooBar = System.String;

....

FooBar x = "Hello";
 
No problem -- just put it in an include file.

D'oh! :) Sometimes I miss C++. Not often, but sometimes.

///ark
 
Hi,

AFAIK this is not possible.
If you are going to create new files with this request you could define a
template and select it when selecting "Add new Item" from the project
explorer.



--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
 
Back
Top