G
Guest
Is there a way to have e delegate for property instead of method ?
For method like this:
void doSomthing(int val);
We can have a delegate like: public delegate void dodo(int val);
and event fro it in the shape of: public event dodo dodoHandler;
and then the above method can be register to the event like this:
dodo += doSomthing;
But in my case I want to register to event using property in the form of:
int m_filed;
public int Filed
{
get { return filed; }
set { filed = value; }
}
Can I do that and How ?
For method like this:
void doSomthing(int val);
We can have a delegate like: public delegate void dodo(int val);
and event fro it in the shape of: public event dodo dodoHandler;
and then the above method can be register to the event like this:
dodo += doSomthing;
But in my case I want to register to event using property in the form of:
int m_filed;
public int Filed
{
get { return filed; }
set { filed = value; }
}
Can I do that and How ?