473,320 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

about enum

Hello!

If you have this enum test declaration can see get the number of items in
this enum.
In this case it's 6.

Can I use some suitable metods or some statement to get this 6 in some way.

enum test : byte {a,b,c,d,e,f};

//Tony
Aug 22 '06 #1
1 1240
You could use the Enum.GetNames(typeof(test)) method and then examine
the Length property of the resulting string[].

Regards,

Jono
tony wrote:
Hello!

If you have this enum test declaration can see get the number of items in
this enum.
In this case it's 6.

Can I use some suitable metods or some statement to get this 6 in some way.

enum test : byte {a,b,c,d,e,f};

//Tony
Aug 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: genc_ ymeri at hotmail dot com | last post by:
well, I making up a "scenario" which may not be the best but I can make my point at least techincally..,. I have this enum : public enum JustTest { Volvo = 0x32324234, Acura = 0x32423443,...
14
by: Steve | last post by:
Sorry in advance for my ignorance. Any help would sure be appreciated. I'm writing a fairly simple application with VB.Net and am obviously a bit of a newbie. This application will be used by 1,...
4
by: Joel Moore | last post by:
Say I have an enum similar to this: <Flags()> Enum TestFlags As Short One = 0 Two = 1 Three = 2 Four = 4 End Enum I figured I could declare variable of type TestFlags to be used in the
1
by: Randy | last post by:
Hi, I downloaded and tried the ENUM++ code from CUJ http://www.cuj.com/documents/s=8470/cujboost0306besser/ but can't even get it to compile (see following). I have also downloaded and...
2
by: Randy | last post by:
Hi, I downloaded and tried the ENUM++ code from CUJ http://www.cuj.com/documents/s=8470/cujboost0306besser/ but can't even get it to compile (see following). I have also downloaded and...
37
by: mdh | last post by:
In one of the answers to a K&R exercise, the first couple of lines are: enum loop { NO, YES}; enum loop okloop=YES; I get the first line, but not the second. Sorry about the LOL question. ...
1
by: UJ | last post by:
I am doing development on a machine and everything was working fine. The name of the project was ECS to I made all my references as ~/ECS/... Worked great. Put it on the final server running...
0
by: Shell | last post by:
Hi, So here's my story. I have an enum that's defined so: public enum AccountKind { Savings = 0, Current = 1, }
7
by: Chad | last post by:
#include <stdio.h> enum Type {DAYS, HOURSMINUTES}; struct Days { int num_days; }; struct HoursMinutes { int num_hours;
15
by: Eoghan | last post by:
Hi there! I have two simple questions about a program i'm doing: 1) if I write: enum logic {VERO=1, FALSO=0}; logic trovato=VERO; Is this correct according to the ANSI '89 standard? 2) I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.