C# Property Delegate?
Posted
by Mark
on Stack Overflow
See other posts from Stack Overflow
or by Mark
Published on 2010-05-09T07:10:04Z
Indexed on
2010/05/09
7:18 UTC
Read the original article
Hit count: 176
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(???, index); // <-- problem is here
}
}
}
© Stack Overflow or respective owner