Zdarzenia oraz delegaty (tak to chyba się tłumaczy?) pełnią podobną funkcje w C#. Jaka jest jednak różnica? Przyjrzyjmy się sposobowi ich użycia:class Program { publicstaticevent EventHandler SimpleEvent =null; publicstatic EventHandler SimpleDelegate =null; staticvoid Main(string[] args) { SimpleEvent+=new EventHandler(EventMethod); SimpleDelegate +=new EventHandler(DelegateMethod); SimpleEvent(null, null); SimpleDelegate(null, null); } staticvoid D...
Strona głównaInne
Inne 5054 dni, 3 godziny, 42 minuty temu 181 pokaż kod licznika zwiń