I would like to give a property setter to a delegate. How is this done?
class A {
private int count;
public int Count {
get { return count; }
set { count = value; }
}
}
A a = new A();
delegate void ChangeCountDelegate(int x);
ChangeCountDelegate dlg = ... ? // should call a.Count = x
Or am I thinking to easy? 🙂
I’m sure you get the point.
The 3rd one works in .NET 2.0, the others need at least 3.5 🙂