TinyCLR Custom Events

I am trying to report progress to my UI from another class/assembly. Typically I handle this with an custom EventHandler (such as "public event EventHandler SomeEvent;) and subscribe from the UI class.

Though the EventHandler delegate is not part of TinyCLR.

What is the proper way to handle this situation? (The class will be executed on another thread)

Thanks

You can define your own delegates for this. This should get you started (typing from memory, should compile, my brain does not have a compiler though):

namespace My.Namespace {
    public delegate MyReturnType MyDelegateName(MyArgument argument);
}
1 Like

Thanks. That’s what I ultimately ended up doing.

Cheers