Click here to Skip to main content
15,901,864 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do I cast a double to an int? Pin
Luc Pattyn11-Apr-11 9:25
sitebuilderLuc Pattyn11-Apr-11 9:25 
AnswerRe: How do I cast a double to an int? Pin
charles henington12-Apr-11 1:34
charles henington12-Apr-11 1:34 
Questiondropdown to enum Pin
fififlowertot11-Apr-11 5:04
fififlowertot11-Apr-11 5:04 
AnswerRe: dropdown to enum PinPopular
OriginalGriff11-Apr-11 5:11
mveOriginalGriff11-Apr-11 5:11 
GeneralRe: dropdown to enum Pin
fififlowertot11-Apr-11 5:35
fififlowertot11-Apr-11 5:35 
GeneralRe: dropdown to enum Pin
musefan11-Apr-11 5:40
musefan11-Apr-11 5:40 
GeneralRe: dropdown to enum Pin
OriginalGriff11-Apr-11 5:48
mveOriginalGriff11-Apr-11 5:48 
GeneralRe: dropdown to enum Pin
BobJanova11-Apr-11 5:39
BobJanova11-Apr-11 5:39 
Good answer, but just thought I'd mention that you then have to cast the result back:
MyEnum value = (MyEnum)Enum.Parse(typeof(MyEnum), str);


Also, it will throw an exception (FormatException, I think?) if the value is invalid so if this is being run from user input where that is a possibility, it should be caught.
GeneralRe: dropdown to enum Pin
OriginalGriff11-Apr-11 5:49
mveOriginalGriff11-Apr-11 5:49 
GeneralRe: dropdown to enum Pin
fififlowertot11-Apr-11 5:50
fififlowertot11-Apr-11 5:50 
GeneralRe: dropdown to enum Pin
OriginalGriff11-Apr-11 6:03
mveOriginalGriff11-Apr-11 6:03 
GeneralRe: dropdown to enum Pin
BobJanova11-Apr-11 22:16
BobJanova11-Apr-11 22:16 
AnswerRe: dropdown to enum Pin
Alan N11-Apr-11 5:53
Alan N11-Apr-11 5:53 
QuestionHow to sync Data of 2 c# projects? Pin
akosidandan11-Apr-11 3:04
akosidandan11-Apr-11 3:04 
AnswerRe: How to sync Data of 2 c# projects? Pin
Wayne Gaylard11-Apr-11 3:11
professionalWayne Gaylard11-Apr-11 3:11 
GeneralRe: How to sync Data of 2 c# projects? Pin
akosidandan11-Apr-11 3:28
akosidandan11-Apr-11 3:28 
GeneralRe: How to sync Data of 2 c# projects? Pin
Wayne Gaylard11-Apr-11 3:36
professionalWayne Gaylard11-Apr-11 3:36 
GeneralRe: How to sync Data of 2 c# projects? Pin
akosidandan11-Apr-11 3:41
akosidandan11-Apr-11 3:41 
GeneralRe: How to sync Data of 2 c# projects? Pin
Wayne Gaylard11-Apr-11 3:52
professionalWayne Gaylard11-Apr-11 3:52 
QuestionNot able to see the dll which is registered successfully in cache Pin
meeram39511-Apr-11 1:44
meeram39511-Apr-11 1:44 
AnswerRe: Not able to see the dll which is registered successfully in cache PinPopular
Wayne Gaylard11-Apr-11 2:01
professionalWayne Gaylard11-Apr-11 2:01 
GeneralRe: Not able to see the dll which is registered successfully in cache Pin
meeram39511-Apr-11 2:13
meeram39511-Apr-11 2:13 
GeneralRe: Not able to see the dll which is registered successfully in cache Pin
meeram39511-Apr-11 2:16
meeram39511-Apr-11 2:16 
GeneralRe: Not able to see the dll which is registered successfully in cache Pin
Wayne Gaylard11-Apr-11 2:21
professionalWayne Gaylard11-Apr-11 2:21 
Questionread pst file and convert in Thunderbird,live [modified] Pin
situ2111-Apr-11 0:55
situ2111-Apr-11 0:55 

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.