C++ typedef equivalent in C#

J

Jon Skeet [C# MVP]

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";
 
M

Mark Wilden

No problem -- just put it in an include file.

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

///ark
 
I

Ignacio Machin \( .NET/ C# MVP \)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top