.net - Check for event listener(vb) for an event raised in C# -
for c# collectionchanged event, how 1 define vb event handler?
for c# code snippet, expression collectionchanged != null
evaluates false indicating vb event handler has not being defined correctly or might missing basic.
public event collectionchangeeventhandler collectionchanged; protected virtual void oncollectionchanged(collectionchangeaction action, expression element) { if (collectionchanged != null) //always null { collectionchangeeventargs e = new collectionchangeeventargs(action, element); collectionchanged(this, e); } } // usage: oncollectionchanged(collectionchangeaction.refresh, item);
the vb event handler defined below:
addhandler expression.expressionscollection.collectionchanged, addressof expressionscollectionupdated
Comments
Post a Comment