Featured post
c# - event is not null but _invocationList is null? -
i thought if have code:
public event propertychangedeventhandler propertychanged; protected void onpropertychanged(propertychangedeventargs e) { if (propertychanged != null) propertychanged(this, e); }
and propertychanged
event wasn't hooked, proeprtychanged
null
, i'm getting propertychanged
not null , _invocationlist
member null
, _invocationcount
member 0. (i think) causing argumentoutofrangeexception when invoke propertychanged(this, e)
. idea problem be?
this stack trace onclick
event:
at system.collections.arraylist.get_item(int32 index) @ system.windows.forms.bindingscollection.get_item(int32 index) @ system.windows.forms.bindingmanagerbase.pushdata(boolean& success) @ system.windows.forms.propertymanager.oncurrentchanged(eventargs ea) @ system.windows.forms.bindtoobject.propvaluechanged(object sender, eventargs e) @ system.eventhandler.invoke(object sender, eventargs e) @ system.componentmodel.propertydescriptor.onvaluechanged(object component, eventargs e) @ system.componentmodel.reflectpropertydescriptor.onvaluechanged(object component, eventargs e) @ system.componentmodel.reflectpropertydescriptor.oninotifypropertychanged(object component, propertychangedeventargs e) @ player.databasemanager.onpropertychanged(propertychangedeventargs e) in c:\users\juan luis\my dropbox\documents\codewebscraper sin player\webscraperandplayer\player\databasemanager2.cs:line 100 @ player.databasemanager.set_tablenames(list`1 value) in c:\users\juan luis\my dropbox\documents\codewebscraper sin player\webscraperandplayer\player\databasemanager2.cs:line 30 @ player.databasemanager.updatetablenames() in c:\users\juan luis\my dropbox\documents\codewebscraper sin player\webscraperandplayer\player\databasemanager2.cs:line 95 @ player.databasemanager.executenonquery(string sqlquery) in c:\users\juan luis\my dropbox\documents\codewebscraper sin player\webscraperandplayer\player\databasemanager2.cs:line 336 @ webscraperandplayer.databaseeditor.deletetablebutton_click(object sender, eventargs e) in c:\users\juan luis\my dropbox\documents\codewebscraper sin player\webscraperandplayer\builderform2\data\databaseeditor.cs:line 90 @ system.windows.forms.toolstripitem.raiseevent(object key, eventargs e) @ system.windows.forms.toolstripbutton.onclick(eventargs e)
look @ stack trace
at system.collections.arraylist.get_item(int32 index) @ system.windows.forms.bindingscollection.get_item(int32 index) @ system.windows.forms.bindingmanagerbase.pushdata(boolean& success) @
this isn't problem event wiring, else messed in data binding.
- Get link
- X
- Other Apps
Comments
Post a Comment