C
Curious
Hi,
I get the error, "Exception has been thrown by the target of an
invocation", at the last line of code.
Any idea why this happens and how to get it fixed?
Type mySFunction = Type.GetTypeFromProgID("S-
PLUS.rsi.em");
object splusObject =
Activator.CreateInstance(mySFunction);
object[] oArgs = new object[] { 33, 11, 56, 80 };
// Get error, "Exception has been thrown by the target
of an invocation"
splusObject.GetType().InvokeMember("x",
System.Reflection.BindingFlags.SetProperty, null, splusObject, oArgs);
I get the error, "Exception has been thrown by the target of an
invocation", at the last line of code.
Any idea why this happens and how to get it fixed?
Type mySFunction = Type.GetTypeFromProgID("S-
PLUS.rsi.em");
object splusObject =
Activator.CreateInstance(mySFunction);
object[] oArgs = new object[] { 33, 11, 56, 80 };
// Get error, "Exception has been thrown by the target
of an invocation"
splusObject.GetType().InvokeMember("x",
System.Reflection.BindingFlags.SetProperty, null, splusObject, oArgs);