- Code: Select all
private void TriggerEvent(string EventName, string Payload)
{
Object[] Params;
Type EventGhost = Type.GetTypeFromProgID("EventGhost");
object myObject = Activator.CreateInstance(EventGhost);
Params = new Object[] { EventName, Payload };
EventGhost.InvokeMember("TriggerEvent", BindingFlags.InvokeMethod, null,
myObject, Params);
}
Thanks jsonnabend for pointing me to the article on .Net late binding.
Bitmonster, any chance we can put this somewhere easy to find in the Wiki?
