Enum type def
From: MuZZy (leyandrewemail-news_at_yahoo.com)
Date: 03/11/04
- Next message: Michael S. Malley: "NotifyIcon Bug, Application.EnableVisualStyles, Application.DoEvents, and Memory Leaks"
- Previous message: Jerry S: "Data Table problem"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: Enum type def"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: Enum type def"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 11 Mar 2004 18:20:23 GMT
Hello,
I want to define an enum type, which in delphi would look like:
--------------------------------------------------------
Type
TOperator = ( opPlus, opMinus, opDivide, opMul, opUnaryMinus );
Var
operator : TOperator;
..
operator := opPlus
--------------------------------------------------------
How do i do that in C#?
If i define:
enum TOperator { opPlus, opMinus, opDivide, opMul, opUnaryMinus };
that's a variable definition, not a class def, right? And i couldn't do:
TOperator op = opPlus; //???
Do i do it this way: Type op = Typeof(TOperator); //?
Thank you,
Andrey
- Next message: Michael S. Malley: "NotifyIcon Bug, Application.EnableVisualStyles, Application.DoEvents, and Memory Leaks"
- Previous message: Jerry S: "Data Table problem"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: Enum type def"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: Enum type def"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|