Compilation error with the ParameterDeclarationCollection item value and ToString
This must be a beta-related issue, and I'm sure it's going to disappear quite soon, but I've banged my head against the wall enough times last night to tell me this might be worth something to someone else.
I've finally made some time to play with the Windows Workflow Foundation extension to Visusl Studio 2005.
Following a very simple set of examples laid out in this great walk-through I quickly got comfortable with it...
Only that I wasn't following it very closely.
I took this part of an example -
Now - you would assume the two are identical. I've never expected a difference in behaviour between them. But the latter causes a compliation error - "error 348: Compilation failed. Exception has been thrown by the target of an invocation."
And the most annoying thing - it does not provide any indication to where the problem is. no line number, no double-click-takes-me-there. nothing. took me a good night sleep and slowly re-building the example to find out the cause (and be really surprised by it)
I've finally made some time to play with the Windows Workflow Foundation extension to Visusl Studio 2005.
Following a very simple set of examples laid out in this great walk-through I quickly got comfortable with it...
Only that I wasn't following it very closely.
I took this part of an example -
public string UserFirstNameand wrote it like this -
{
get { return (string) Parameters["FirstName"].Value; }
set { Parameters["FirstName"].Value = value; }
}
public string UserFirstNameTo save you the time spotting the difference - the example from the article uses - "return (string)parameters" and I'm using "return parameters.ToString()"
{
get { return Parameters["FirstName"].Value.ToString(); }
set { Parameters["FirstName"].Value = value; }
}
Now - you would assume the two are identical. I've never expected a difference in behaviour between them. But the latter causes a compliation error - "error 348: Compilation failed. Exception has been thrown by the target of an invocation."
And the most annoying thing - it does not provide any indication to where the problem is. no line number, no double-click-takes-me-there. nothing. took me a good night sleep and slowly re-building the example to find out the cause (and be really surprised by it)