Click here to Skip to main content
15,898,588 members
Home / Discussions / C#
   

C#

 
GeneralRe: Clipboard paste formated text in Word Pin
juliogyn13-Aug-13 7:59
juliogyn13-Aug-13 7:59 
GeneralRe: Clipboard paste formated text in Word Pin
OriginalGriff13-Aug-13 8:04
mveOriginalGriff13-Aug-13 8:04 
GeneralRe: Clipboard paste formated text in Word Pin
juliogyn13-Aug-13 8:58
juliogyn13-Aug-13 8:58 
QuestionConditional question Pin
vkEE12-Aug-13 8:32
vkEE12-Aug-13 8:32 
GeneralRe: Conditional question Pin
PIEBALDconsult12-Aug-13 11:01
mvePIEBALDconsult12-Aug-13 11:01 
AnswerRe: Conditional question Pin
BillWoodruff12-Aug-13 19:28
professionalBillWoodruff12-Aug-13 19:28 
AnswerRe: Conditional question Pin
V.12-Aug-13 21:05
professionalV.12-Aug-13 21:05 
GeneralRe: Conditional question Pin
BillWoodruff13-Aug-13 6:33
professionalBillWoodruff13-Aug-13 6:33 
This is not a criticism of the general idea in your code example above, but your example does not match the behavior in the OP's original 'switch statement. It would also be far less efficient than a case/switch block.

There are many ways the OP's desired outcome could be implemented, but the OP's code is clearly flawed: it will not compile as is because of potential type-mismatch between the return type expected (string), and the input parameter value being: !=1 && !=2

Even if (the most unlikely hypothesis I can imagine) the OP had made the variable 'value of Type 'dynamic: the code would not compile: "A switch expression or case label must be a bool, char, string, integral, enum, or corresponding nullable type."

~
“This isn't right; this isn't even wrong." Wolfgang Pauli, commenting on a physics paper submitted for a journal

GeneralRe: Conditional question Pin
V.13-Aug-13 19:41
professionalV.13-Aug-13 19:41 
GeneralRe: Conditional question Pin
BillWoodruff14-Aug-13 4:03
professionalBillWoodruff14-Aug-13 4:03 
GeneralRe: Conditional question Pin
vkEE13-Aug-13 6:56
vkEE13-Aug-13 6:56 
GeneralRe: Conditional question Pin
BillWoodruff13-Aug-13 7:14
professionalBillWoodruff13-Aug-13 7:14 
AnswerRe: Conditional question Pin
V.13-Aug-13 19:48
professionalV.13-Aug-13 19:48 
GeneralRe: Conditional question Pin
Forbiddenx14-Aug-13 8:30
Forbiddenx14-Aug-13 8:30 
GeneralRe: Conditional question Pin
BillWoodruff24-Aug-13 14:10
professionalBillWoodruff24-Aug-13 14:10 
AnswerRe: Conditional question Pin
Forbiddenx14-Aug-13 8:17
Forbiddenx14-Aug-13 8:17 
QuestionLicensing Hardware Pin
Bram van Kampen11-Aug-13 15:23
Bram van Kampen11-Aug-13 15:23 
AnswerRe: Licensing Hardware Pin
Bernhard Hiller11-Aug-13 22:11
Bernhard Hiller11-Aug-13 22:11 
AnswerRe: Licensing Hardware Pin
Ron Beyer12-Aug-13 16:35
professionalRon Beyer12-Aug-13 16:35 
Questionlogin form Pin
Member 1020296011-Aug-13 12:15
Member 1020296011-Aug-13 12:15 
AnswerRe: login form Pin
Mycroft Holmes11-Aug-13 12:45
professionalMycroft Holmes11-Aug-13 12:45 
GeneralRe: login form Pin
Member 1020296012-Aug-13 6:25
Member 1020296012-Aug-13 6:25 
GeneralRe: login form Pin
Mycroft Holmes12-Aug-13 12:41
professionalMycroft Holmes12-Aug-13 12:41 
AnswerRe: login form Pin
Abhinav S11-Aug-13 17:07
Abhinav S11-Aug-13 17:07 
QuestionDelegates N Events Pin
Star13511-Aug-13 1:39
Star13511-Aug-13 1:39 

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.