General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 25th, 2003, 06:02 AM
thomaskeegan thomaskeegan is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 15 thomaskeegan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
from a int/number to enum string value

Code:
enum Indentifier
{
      Category,
      FundsInCategory,
      ISIN,
      FundName,
      Promotor,
      Currency,
      DividendPaying,
      LastDividend,
      LastDividendDate,
}


as you know if you do

(int)Indentifier.ISIN it will be 2 and
Indentifier.ToString() will give "ISIN"

but if I have a number say 5 and I want the corresponing Indentifier string "Currency" how do I get it?

so that I can something like this?
Code:
 
for(int i = 0; i < Indentifier Size; ++i)
{
      Write(Indentifier[i].toString());
}


any ideas?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > from a int/number to enum string value


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway