[mono-vb] Using reflection to invoke a method written in VB throws an exception
Rolf Bjarne Kvinge
rolflists at ya.com
Mon Jun 14 04:31:20 EDT 2010
> I will change the code to one of the alternatives. I guess the fix
> will be included in the 2.8 release?
Yes, it will.
> Also, did you create a bug report?
No, I did not.
> If you did, what is the link? I would like to include it in the commit
> message when I make the change.
Maybe you can include a link to this thread instead?
> >> I guess a work around until a patch is
> >> released for users will be to write it out the long way:
> >> var counter = ScenarioContext.Current.Item("counter")
> >> ScenarioContext.Current.Item("counter") = counter + 1
> > This will work (except that you're mixing C# and VB here, VB doesn't
> > 'var' :) )
> Doh!:) Of course I meant to write:
> Dim counter as Int =
> DirectCast(ScenarioContext.Current.Item("counter"), Integer)
> Sorry I code in C# and I whipped that up pretty quick and I wasn't
> > Note that the bug was only for a few very specific code sequences
> > still worked for instance: ScenarioContext.Current("counter") += 1)
> Thanks, I will use this instead, since it is similar to what was
> the bug.
More information about the Mono-vb