In my other methods I could do something like this,
public void Add(T item)
{
if (dispatcher.CheckAccess())
{
...
}
else
{
dispatcher.Invoke(new Action<T>(Add), item);
}
}
But how do I invoke a property for a situation like this?
public T this[int index]
{
get
{
...
}
set
{
if (dispatcher.CheckAccess())
{
...
}
else
{
dispatcher.Invoke(???, value, index); // <-- problem is here
}
}
}