JonKruger/SpecFlow — comment on commit 0871b30886c7cb08f8974cedfed6210237cb449e
File:  line 0
By citizenmatt:

Can I add my vote to this, please? Silverlight doesn't work without this.

To add a little more context to the issue (#141) and the pull request, the lambda generated to call the step definition boils down to the moral equivalent of:

```C#
(__contextManager, {args}) => Convert(__contextManager.ScenarioContext.GetBindingInstance({MyStepDefinitionClass}).{MyStepMethod}({args})
```

Where the value of {MyStepDefinitionClass} is a constant whose value is MethodInfo.ReflectedType of the step definition method, which returns the type of the step defintion class. If you don't specify a type for the constant expression, the call to Expression.Constant will call GetType on the value passed through, and use that. When the code is run, MethodInfo.ReflectedType is an instance of System.RuntimeType, and so the constant also gets created as an instance of System.RuntimeType, which is unfortunately internal in Silverlight, and everything blows up. Telling the Expression.Constant method to build a constant of type System.Type fixes all this, and lets everything work just fine.

I haven't looked at the test project...

So, +1 for inclusion from me!

Thanks
Matt