Bad flags on delegate constructor

Прям exception-неделя у меня )

В общем ответ гуглился и взят отсюда


The cause is a System.Windows.Form v2.0 bug I identified this morning (and that is fixed in System.Windows.Form v4.0).
For me it happened while my code adds an Item to the ListBox while the hosting process is shutting down. The private instance field ListBox.listItemsArray is null and this provokes theNullReferenceException. I don't know exactly why ListBox.listItemsArray is null, but I'd guess it is related to a handle creation problem.
For me the workaround was easy since a try/catch was enough because the process is shutting down anyway. You can certainly dig ino the problem with the decompiling Reflector feature as I did:
enter image description here

Комментариев нет:

Отправить комментарий

Можете оставить свой комментарий