Click here to Skip to main content
15,903,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cast Action to Action Pin
Eddy Vluggen31-Mar-11 3:05
professionalEddy Vluggen31-Mar-11 3:05 
GeneralRe: Cast Action to Action Pin
J4amieC31-Mar-11 3:38
J4amieC31-Mar-11 3:38 
GeneralRe: Cast Action to Action Pin
Eddy Vluggen31-Mar-11 3:45
professionalEddy Vluggen31-Mar-11 3:45 
GeneralRe: Cast Action to Action Pin
J4amieC31-Mar-11 5:46
J4amieC31-Mar-11 5:46 
GeneralRe: Cast Action to Action Pin
Eddy Vluggen31-Mar-11 7:00
professionalEddy Vluggen31-Mar-11 7:00 
GeneralRe: Cast Action to Action Pin
PIEBALDconsult31-Mar-11 15:00
mvePIEBALDconsult31-Mar-11 15:00 
AnswerRe: Cast Action to Action Pin
Pete O'Hanlon30-Mar-11 22:34
mvePete O'Hanlon30-Mar-11 22:34 
GeneralRe: Cast Action to Action Pin
Adriaan Davel30-Mar-11 22:46
Adriaan Davel30-Mar-11 22:46 
Thanks for the reply Pete, just not sure I fully understand your explanation.
What you are saying that (assuming this was allowed) this wouldn't be a problem:
Action<object> act = null;
act = new Action<int>();


but the problem would come in if I tried:
act("a");


If that's what you are saying then I'm a bit disappointed in MS because type conversion from object has always posed this challenge (I recon this is why generics was brought in) and yes its fair to expect me to pass the right value in or get a runtime error...
____________________________________________________________
Be brave little warrior, be VERY brave

GeneralRe: Cast Action to Action Pin
Pete O'Hanlon30-Mar-11 23:21
mvePete O'Hanlon30-Mar-11 23:21 
GeneralRe: Cast Action to Action Pin
Adriaan Davel30-Mar-11 23:52
Adriaan Davel30-Mar-11 23:52 
GeneralRe: Cast Action to Action Pin
Eddy Vluggen31-Mar-11 0:03
professionalEddy Vluggen31-Mar-11 0:03 
GeneralRe: Cast Action to Action Pin
RobCroll31-Mar-11 2:32
RobCroll31-Mar-11 2:32 
AnswerRe: Cast Action to Action Pin
J4amieC30-Mar-11 23:22
J4amieC30-Mar-11 23:22 
AnswerRe: Cast Action to Action Pin
BobJanova30-Mar-11 23:28
BobJanova30-Mar-11 23:28 
AnswerRe: Cast Action to Action Pin
Rob Philpott31-Mar-11 1:39
Rob Philpott31-Mar-11 1:39 
GeneralRe: Cast Action to Action Pin
PIEBALDconsult31-Mar-11 2:59
mvePIEBALDconsult31-Mar-11 2:59 
GeneralRe: Cast Action to Action Pin
Rob Philpott31-Mar-11 3:24
Rob Philpott31-Mar-11 3:24 
QuestionSolution directory Pin
Helfdane30-Mar-11 11:59
Helfdane30-Mar-11 11:59 
AnswerRe: Solution directory Pin
Luc Pattyn30-Mar-11 12:08
sitebuilderLuc Pattyn30-Mar-11 12:08 
GeneralRe: Solution directory Pin
Helfdane30-Mar-11 21:17
Helfdane30-Mar-11 21:17 
GeneralRe: Solution directory Pin
Luc Pattyn30-Mar-11 22:06
sitebuilderLuc Pattyn30-Mar-11 22:06 
GeneralRe: Solution directory Pin
Helfdane30-Mar-11 22:08
Helfdane30-Mar-11 22:08 
AnswerRe: Solution directory Pin
Eddy Vluggen30-Mar-11 12:24
professionalEddy Vluggen30-Mar-11 12:24 
AnswerRe: Solution directory Pin
RobCroll30-Mar-11 13:46
RobCroll30-Mar-11 13:46 
AnswerRe: Solution directory Pin
GenJerDan30-Mar-11 14:50
GenJerDan30-Mar-11 14:50 

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.