Click here to Skip to main content
12,244,678 members (45,353 online)
   

C#

 
AnswerRe: Opacity Pin
Eddy Vluggen11-Oct-12 2:31
memberEddy Vluggen11-Oct-12 2:31 
GeneralRe: Opacity Pin
Sentenryu11-Oct-12 7:24
memberSentenryu11-Oct-12 7:24 
GeneralRe: Opacity Pin
Eddy Vluggen11-Oct-12 11:02
memberEddy Vluggen11-Oct-12 11:02 
GeneralRe: Opacity Pin
Sentenryu15-Oct-12 1:06
memberSentenryu15-Oct-12 1:06 
GeneralRe: Opacity Pin
Pete O'Hanlon11-Oct-12 8:40
protectorPete O'Hanlon11-Oct-12 8:40 
AnswerRe: Opacity Pin
Dave Kreskowiak11-Oct-12 7:37
mvpDave Kreskowiak11-Oct-12 7:37 
QuestionFTP connection error 431 Pin
nitin_ion10-Oct-12 18:54
membernitin_ion10-Oct-12 18:54 
SuggestionRe: FTP connection error 431 Pin
Shameel11-Oct-12 2:05
memberShameel11-Oct-12 2:05 
QuestionC# progam call second C# program Pin
dcof10-Oct-12 17:04
memberdcof10-Oct-12 17:04 
AnswerRe: C# progam call second C# program Pin
Richard MacCutchan10-Oct-12 22:48
mvpRichard MacCutchan10-Oct-12 22:48 
AnswerRe: C# progam call second C# program Pin
Pete O'Hanlon10-Oct-12 23:21
protectorPete O'Hanlon10-Oct-12 23:21 
QuestionCitrix Session Pin
Arun Philip Reynolds10-Oct-12 9:30
memberArun Philip Reynolds10-Oct-12 9:30 
AnswerRe: Citrix Session Pin
Eddy Vluggen11-Oct-12 0:57
memberEddy Vluggen11-Oct-12 0:57 
QuestionEnumerate through the values of a enum Pin
Sentenryu10-Oct-12 8:38
memberSentenryu10-Oct-12 8:38 
ok, I Know about Enum.GetValues(), but what i want to know if is possible is to do a foreach through the values of a enum such as i can do the following:

foreach(var value in enum){
   list.Add(new SelectListItem(){
       Text = value.ToString(),
       Value =  ((int)value).ToString()
   });
}

say that i have the following enum:

enum States{
       Running,
       Stoped,
       Paused
}

the only way to accomplish what i described above is through the use of Enum.GetValues() and Enum.GetNames()? or there is some syntax sugar?

I'm asking more out of curiosity than anything else Wink | ;)
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

AnswerRe: Enumerate through the values of a enum Pin
Dave Kreskowiak10-Oct-12 9:01
mvpDave Kreskowiak10-Oct-12 9:01 
GeneralRe: Enumerate through the values of a enum Pin
Sentenryu10-Oct-12 9:18
memberSentenryu10-Oct-12 9:18 
GeneralRe: Enumerate through the values of a enum Pin
Dave Kreskowiak10-Oct-12 9:29
mvpDave Kreskowiak10-Oct-12 9:29 
GeneralRe: Enumerate through the values of a enum Pin
Sentenryu10-Oct-12 9:55
memberSentenryu10-Oct-12 9:55 
GeneralRe: Enumerate through the values of a enum Pin
Mr. Tapan Kumar10-Oct-12 10:47
memberMr. Tapan Kumar10-Oct-12 10:47 
GeneralRe: Enumerate through the values of a enum Pin
J4amieC10-Oct-12 22:26
memberJ4amieC10-Oct-12 22:26 
GeneralRe: Enumerate through the values of a enum Pin
J4amieC10-Oct-12 22:25
memberJ4amieC10-Oct-12 22:25 
GeneralRe: Enumerate through the values of a enum Pin
Dave Kreskowiak11-Oct-12 0:52
mvpDave Kreskowiak11-Oct-12 0:52 
AnswerRe: Enumerate through the values of a enum Pin
J4amieC10-Oct-12 22:20
memberJ4amieC10-Oct-12 22:20 
GeneralRe: Enumerate through the values of a enum Pin
Sentenryu11-Oct-12 1:07
memberSentenryu11-Oct-12 1:07 
QuestionProviderUserKey error Pin
saiprakash031510-Oct-12 7:15
membersaiprakash031510-Oct-12 7:15 
AnswerRe: ProviderUserKey error Pin
OriginalGriff10-Oct-12 9:36
mvpOriginalGriff10-Oct-12 9:36 
GeneralRe: ProviderUserKey error Pin
saiprakash031510-Oct-12 15:14
membersaiprakash031510-Oct-12 15:14 
QuestionC# Pin
Jaleel Ahmed10-Oct-12 7:11
memberJaleel Ahmed10-Oct-12 7:11 
AnswerRe: C# Pin
Paul Conrad10-Oct-12 8:31
memberPaul Conrad10-Oct-12 8:31 
AnswerRe: C# Pin
Abhinav S10-Oct-12 17:08
mvpAbhinav S10-Oct-12 17:08 
AnswerRe: C# Pin
KiranKumar Roy14-Oct-12 2:36
memberKiranKumar Roy14-Oct-12 2:36 
QuestionProgressive tax calculator in C# Pin
cyberhopper10-Oct-12 3:26
membercyberhopper10-Oct-12 3:26 
AnswerRe: Progressive tax calculator in C# Pin
Pete O'Hanlon10-Oct-12 4:05
protectorPete O'Hanlon10-Oct-12 4:05 
GeneralRe: Progressive tax calculator in C# Pin
Paul Conrad10-Oct-12 8:33
memberPaul Conrad10-Oct-12 8:33 
QuestionC# obtain return code from a proxy Pin
dcof10-Oct-12 3:23
memberdcof10-Oct-12 3:23 
AnswerRe: C# obtain return code from a proxy Pin
dojohansen10-Oct-12 4:06
memberdojohansen10-Oct-12 4:06 
GeneralRe: C# obtain return code from a proxy Pin
Pete O'Hanlon10-Oct-12 4:08
protectorPete O'Hanlon10-Oct-12 4:08 
GeneralRe: C# obtain return code from a proxy Pin
dojohansen10-Oct-12 6:52
memberdojohansen10-Oct-12 6:52 
GeneralRe: C# obtain return code from a proxy Pin
dcof10-Oct-12 17:00
memberdcof10-Oct-12 17:00 
GeneralRe: C# obtain return code from a proxy Pin
dojohansen11-Oct-12 0:33
memberdojohansen11-Oct-12 0:33 
QuestionRender Excel document to word document using C#.net Pin
Ullas_Joseph9-Oct-12 23:35
memberUllas_Joseph9-Oct-12 23:35 
AnswerRe: Render Excel document to word document using C#.net Pin
Marco Bertschi12-Oct-12 6:03
memberMarco Bertschi12-Oct-12 6:03 
QuestionSheet name is missing when doing a "SAve As" for Excel document to PDF Pin
Ullas_Joseph9-Oct-12 22:24
memberUllas_Joseph9-Oct-12 22:24 
AnswerRe: Sheet name is missing when doing a "SAve As" for Excel document to PDF Pin
Pete O'Hanlon9-Oct-12 23:55
protectorPete O'Hanlon9-Oct-12 23:55 
QuestionC# exclude file from directory search Pin
classy_dog9-Oct-12 18:51
memberclassy_dog9-Oct-12 18:51 
AnswerRe: C# exclude file from directory search Pin
n.podbielski9-Oct-12 22:00
membern.podbielski9-Oct-12 22:00 
AnswerRe: C# exclude file from directory search Pin
OriginalGriff9-Oct-12 22:07
mvpOriginalGriff9-Oct-12 22:07 
QuestionHow to draw on web page? Pin
Member 5414189-Oct-12 10:31
memberMember 5414189-Oct-12 10:31 
AnswerRe: How to draw on web page? Pin
Pete O'Hanlon9-Oct-12 10:54
protectorPete O'Hanlon9-Oct-12 10:54 
GeneralRe: How to draw on web page? Pin
Member 5414189-Oct-12 11:29
memberMember 5414189-Oct-12 11:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 1 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid