Current .Net Version: 1.1.4322
Home
Articles
Practice C# Online
C# Reference
XML Web Services
RSS Feeds
T-SQL Scripts
Videos
Valuable Links
Contact Us
Mike's C#, VS.NET and SQL Blog
ROR XML Info.
C# Reference
The world's largest C# Language & Framework Class Library Reference Database (second only to Microsoft's)!
Language Reference:
Language Search:
Framework Class Library Reference:
Framework Class Library Search:

event
Is a:Modifier Keyword
Applies to Version:C# 1.0 and later
Namespace:N/A
Assembly:N/A (N/A)
Description:Declares an event variable from a delegate. An event requires a delegate in order for it to work properly. Any methods assigned to the event's delegate are called when the event is "raised" or "called".
Syntax:
[attributes] [modifiers] event type declarator;
[attributes] [modifiers] event type member-name {accessor-declarations};
Example(s):public class Test { public delegate void EventHandler(); public event EventHandler MyEvent; public Test() { // raise the event IF it has been assigned a delegate if (MyEvent != null) MyEvent(); } }
 
COPYRIGHT/DISCLAIMER | CONTACT US