Hi everyone
I am kind of new to all of this multithreading stuff so please excuse me if I explain this badly :)

Let's say I have two classes:

```
class abc {
    public string SomeProperty {
        get { return something; }
        set { /* This code has to execute in the main application thread */ }
    }

    public void SomeMethod() {
        /* This code also has to execute in the main application thread */
    }
}

class def {
    abc obj;

    public def() {
        abc = new obj();
    }

    public void SomeMethod() {
        abc.SomeProperty = "SomeValue";
        abc.SomeMethod();
    }
}

```

The problem I am having is getting SomeProperty and SomeMethod to execute on the main application thread. I have tried:

```
abc.GetType().InvokeMember("SomeProperty", System.Reflection.BindingFlags.SetProperty, null, abc, new object[] { "SomeValue" });
abc.GetType().InvokeMember("SomeMethod", System.Reflection.BindingFlags.InvokeMethod, null, abc, null);

```

However, the code which needs to execute in the main application thread isn't being executed in the main application thread, even using InvokeMember (I don't think so anyway)
I have tried outputting the current thread name in the code, and it doesn't output the main application thread name.

Is there a way that I can do this?
If I have explained things badly just let me know :)
Thanks!