Re: Вопрос по событиям.
От: Niemand Австралия  
Дата: 11.09.06 12:13
Оценка:
A>То при генерации события вылетит эксепшн:
A>An unhandled exception of type 'System.NullReferenceException' occurred.
A>Additional information: Object reference not set to an instance of an object.

для того, чтобы такого не было пиши проверку, есть ли получатель сообщения:

public void Method()
{
if (SomeEvent!=null)
SomeEvent("Hello world!");
}
If the message above is in English — means I'm wasting my work time and work computer to post here. No hard feelings
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.