Hi
I am using VS 2010 Express and have ported some code proven in VS 2008 but it fails in VS 2010 and I cannot understand why.
The code uses InvokeMember:
<object>.Interface.GetType().InvokeMember("<Method Name>",
System.Reflection.BindingFlags.InvokeMethod,
null, <Object>.Interface, new object[] { <params> });
It works fine in VS 2008 but not in VS 2010, exception thrown is "Value does not fall within the expected range." The code and references are identical, the <object> is not null.
Baffled.
Any ideas?