Hi Everyone. I have an interface:
What I'm trying to do is implement a wrapper that calls the SaySomething() method on a worker thread which will abort the thread if it takes too long.
Does anybody know how I can get a generic delegate (function pointer) to point to one of my interface methods?
Thanks
Paul
Code:
namespace SharedInterfaces
{
public interface ICommunicationService
{
void SaySomething( String pText );
}
}
Code:
public delegate void MyFunc( String s );
...
public ICommunicationService obj;
obj = ( ICommunicationService )
Activator.GetObject( typeof( ICommunicationService ),
"ipc://IPChannelName/PaulStuff" );
// The below line won't work..
public MyFunc f = obj.SaySomething;
Thanks
Paul