Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying To Understand Events
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01382673
Message ID:
01382923
Vues:
36
Yes, I noticed that too. Not enough morning coffee.





>>Excellent. Thanks.
>>
>>However, I'm now getting the same error at runtime on this line in my class:
>>
>
>I was just looking at your original code - you're hooking up the event after you call the method which raises the event (which means the event is null - per my suggestion to write code which checks to see if it's null before raising the event).
>
>If you change the order of the code it should work:
>
>
>            BankAccounts oBank = new BankAccounts();
>            oBank.ReaderRetreived += new ReaderRetreivedEvent(ReaderRetreived);  // COMPILE ERROR HERE
>            oReader = oBank.GetReader("select * from registers");
>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform