J
Jeff Gaines
I am doing a New Year clean up of my library files and trying to ensure I
use the 'accepted' naming conventions in my Delegates and Events. I think
the following uses those conventions but would appreciate any comments:
internal delegate void PathChangedEventHandler(object sender, JTagData
tagData);
internal event PathChangedEventHandler PathChanged;
protected virtual void OnPathChanged(object sender, JTagData e)
{
if (PathChanged != null)
PathChanged(sender, e);
}
private void RaisePathChangedEvent(object sender, JTagData tagData)
{
OnPathChanged(sender, tagData);
}
It is then hooked up from the program using the class as:
m_SysListView.PathChanged += new
PathChangedEventHandler(m_SysListView_PathChanged);
I could probably skip the RaisePathChangedEvent but sometimes I do
conversions in there and I want to stick to a standard.
Would appreciate any guidance and Happy New Year
use the 'accepted' naming conventions in my Delegates and Events. I think
the following uses those conventions but would appreciate any comments:
internal delegate void PathChangedEventHandler(object sender, JTagData
tagData);
internal event PathChangedEventHandler PathChanged;
protected virtual void OnPathChanged(object sender, JTagData e)
{
if (PathChanged != null)
PathChanged(sender, e);
}
private void RaisePathChangedEvent(object sender, JTagData tagData)
{
OnPathChanged(sender, tagData);
}
It is then hooked up from the program using the class as:
m_SysListView.PathChanged += new
PathChangedEventHandler(m_SysListView_PathChanged);
I could probably skip the RaisePathChangedEvent but sometimes I do
conversions in there and I want to stick to a standard.
Would appreciate any guidance and Happy New Year
