A
AlexS
I've called one of methods on my class with Type.InvokeMember - see sample
code below.
When I moved this code (enclosing procedure) into separate library (separate
from type, where I call member), call stopped to work. In dbgclr nothing
happens at all, during run I get exception that Member not found. However it
is present in target assembly. Type is detected Ok too.
Is that some kind of limitation for this call?
Anybody?
Sample code:
BindingFlags bf=BindingFlags.InvokeMethod
| BindingFlags.DeclaredOnly
| BindingFlags.Public
| BindingFlags.Static;
tp.InvokeMember("Execute",
bf,
null,
null,
parms);
The only difference with working code is that before everything was done in
same assembly (exe). Now called type (class) is in separate assembly. So
basically call is from one dll to another one.
Any hints, what could the problem? Why now target member can't be found?
Thanks!
code below.
When I moved this code (enclosing procedure) into separate library (separate
from type, where I call member), call stopped to work. In dbgclr nothing
happens at all, during run I get exception that Member not found. However it
is present in target assembly. Type is detected Ok too.
Is that some kind of limitation for this call?
Anybody?
Sample code:
BindingFlags bf=BindingFlags.InvokeMethod
| BindingFlags.DeclaredOnly
| BindingFlags.Public
| BindingFlags.Static;
tp.InvokeMember("Execute",
bf,
null,
null,
parms);
The only difference with working code is that before everything was done in
same assembly (exe). Now called type (class) is in separate assembly. So
basically call is from one dll to another one.
Any hints, what could the problem? Why now target member can't be found?
Thanks!