By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,667 Members | 1,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,667 IT Pros & Developers. It's quick & easy.

Enum.GetNames

P: n/a
a.. How can I return all the values in a enumerator. I tried like the
following, but it doesn't work and there are no examples in the VS Help:
enum test {a, b, c}
Console.WriteLine(Enum.GetNames(test));
thanks,

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Marcelo try something like this:

foreach(string t in Enum.GetNames (typeof(test)))

Console.WriteLine (t);

HTH,

Sasha Imamovich

"J. Marcelo Barbieri" <mb*******@bf.com.br> wrote in message
news:#r**************@TK2MSFTNGP12.phx.gbl...
a.. How can I return all the values in a enumerator. I tried like the
following, but it doesn't work and there are no examples in the VS Help:
enum test {a, b, c}
Console.WriteLine(Enum.GetNames(test));
thanks,

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.