Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there anything equal to typedef in C

Status
Not open for further replies.

SonicChen

Programmer
Feb 14, 2004
62
CN
example:
enum CoinEvent = {obverse, reverso};
float Probability;
but maybe we need a double type to denote the probability or even can't decide the type before we finish the whole program;
so we have
typedef ProType float; //or
#define ProType float
in C. but i don't know how to realize it in C#.
 
There are no typedefs in .NET -- this was an explicit decision by the CLR designers.

Anything you need to do with a typedef can/should be done with objects and O-O design techniques.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top