Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
QuestionDataGridView RowHeader Text Pin
freshonlineMax14-Apr-07 18:54
freshonlineMax14-Apr-07 18:54 
QuestionNeed Help With Win Forms Pin
DRAYKKO14-Apr-07 16:07
professionalDRAYKKO14-Apr-07 16:07 
AnswerRe: Need Help With Win Forms Pin
Muammar©14-Apr-07 19:29
Muammar©14-Apr-07 19:29 
AnswerRe: Need Help With Win Forms Pin
Christian Graus14-Apr-07 21:06
protectorChristian Graus14-Apr-07 21:06 
GeneralRe: Need Help With Win Forms Pin
DRAYKKO14-Apr-07 22:53
professionalDRAYKKO14-Apr-07 22:53 
GeneralRe: Need Help With Win Forms Pin
Christian Graus15-Apr-07 0:04
protectorChristian Graus15-Apr-07 0:04 
GeneralRe: Need Help With Win Forms Pin
DRAYKKO15-Apr-07 5:24
professionalDRAYKKO15-Apr-07 5:24 
QuestionHow get an Array with the EnumValues from a FlagEnum-Value Pin
MarkPhB14-Apr-07 12:48
MarkPhB14-Apr-07 12:48 
Is it possible to get an Array with the Enum-Values from a FlagEnum-Value ?

I mean the following.

For example i have a enumation with flag-values like this:
<code>
public enum SampleEnum{
  Alpha = 1,
  Beta = 2,
  Gamma = 4,
  Delta = 8,
  Epsilon = 16
}

...and now i got a variable like this:
<code>
private SampleEnum var = SampleEnum.Alpha | SampleEnum.Gamma | SampleEnum.Epsilon;

My question is now is there a simple way to bring that values...
<code>
SampleEnum.Alpha | SampleEnum.Gamma | SampleEnum.Epsilon 

... in an array where the array contains the enum values of the flag-enum-value like this:
<code>
private SampleEnum[] varArray = new SampleEnum[3];

SampleEnum[0] SampleEnum.Alpha 
SampleEnum[1] SampleEnum.Gamma 
SampleEnum[2] SampleEnum.Epsilon 

I tried something like the following but it dont work =/
<code>
private SampleEnum var = SampleEnum.Alpha | SampleEnum.Gamma | SampleEnum.Epsilon;

private SampleEnum[] varArray = (SampleEnum[]) var ;


I hope you know what i mean.
AnswerRe: How get an Array with the EnumValues from a FlagEnum-Value Pin
Luc Pattyn14-Apr-07 13:31
sitebuilderLuc Pattyn14-Apr-07 13:31 
GeneralRe: How get an Array with the EnumValues from a FlagEnum-Value Pin
MarkPhB15-Apr-07 1:12
MarkPhB15-Apr-07 1:12 
AnswerRe: How get an Array with the EnumValues from a FlagEnum-Value Pin
Scott Dorman14-Apr-07 14:23
professionalScott Dorman14-Apr-07 14:23 
GeneralRe: How get an Array with the EnumValues from a FlagEnum-Value Pin
MarkPhB15-Apr-07 2:54
MarkPhB15-Apr-07 2:54 
QuestionAcces an ArrayList from multiple threads Pin
crazy friend14-Apr-07 9:00
crazy friend14-Apr-07 9:00 
AnswerRe: Acces an ArrayList from multiple threads Pin
Luc Pattyn14-Apr-07 12:46
sitebuilderLuc Pattyn14-Apr-07 12:46 
QuestionIs is possible to change the setting of the ContextMenu? Pin
Khoramdin14-Apr-07 8:49
Khoramdin14-Apr-07 8:49 
AnswerRe: Is is possible to change the setting of the ContextMenu? Pin
Luc Pattyn14-Apr-07 12:51
sitebuilderLuc Pattyn14-Apr-07 12:51 
QuestionRe: Is is possible to change the setting of the ContextMenu? Pin
Khoramdin15-Apr-07 7:27
Khoramdin15-Apr-07 7:27 
AnswerRe: Is is possible to change the setting of the ContextMenu? Pin
maryamf14-Apr-07 22:48
maryamf14-Apr-07 22:48 
QuestionRe: Is is possible to change the setting of the ContextMenu? [modified] Pin
Khoramdin15-Apr-07 6:05
Khoramdin15-Apr-07 6:05 
Questionshow array elements Pin
ahmad al-omar14-Apr-07 6:21
ahmad al-omar14-Apr-07 6:21 
AnswerRe: show array elements Pin
Thomas Stockwell14-Apr-07 6:37
professionalThomas Stockwell14-Apr-07 6:37 
GeneralRe: show array elements Pin
Colin Angus Mackay14-Apr-07 6:55
Colin Angus Mackay14-Apr-07 6:55 
GeneralRe: show array elements Pin
Thomas Stockwell14-Apr-07 8:16
professionalThomas Stockwell14-Apr-07 8:16 
AnswerRe: show array elements Pin
George L. Jackson14-Apr-07 8:33
George L. Jackson14-Apr-07 8:33 
GeneralRe: show array elements Pin
ahmad al-omar14-Apr-07 9:13
ahmad al-omar14-Apr-07 9:13 

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.