This is the definitions I have in the
private SavePreferenceCallback savePreferenceHandler;
public SavePreferenceCallback SavePreferenceHandler
{
get
{
return savePreferenceHandler;
}
set
{
savePreferenceHandler = value;
}
}
and then in debugging the code when I come to a line that is this:
savePreferenceHandler();
I don't know how to go further and what to look at? what method is it running?
If you want to know what method will be called you can mouse over the variable savePreferenceHandler
, and the debugger will show you what method is assigned.
You also can put a breakpoint in your property setter to see what method is assigned.
Lastly, you could use F11 and step into the method as it is invoked.
Press F11 to step into the code and you'll find out, basically. Or you could always examine the value of savePreferenceHandler
to see the method (or methods) it represents.
Side-node: if you're using C# 3 or above, you can make that property considerably simpler:
public SavePreferenceCallBack SavePreferenceHandler { get; set; }
You might also consider making it an event instead.
savePreferenceHandler
variable - payo 2012-04-05 20:07