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:

delegate
Is a:Type Keyword
Applies to Version:C# 1.0 and later
Namespace:System
Assembly:Mscorlib (Mscorlib.dll)
Description:Declares delegates using the System.Delegate reference type. A delegate can be used to encapsulate a static or instance method with a specific signature (similar to pointers in C++).
Syntax:
[attributes] [b39c758e-fafd-47d6-ace5-338704b10e8as] delegate result-type identifier ([formal-parameters]);
Example(s):public class Test { public delegate void EventHandler(); public event EventHandler EventOccured; public Test() { // if a target method has been assigned to the EventHandler // then EventOccured will NOT be null and the event will // be "raised" by calling the target method here: if (EventOccured != null) EventOccured(); } }
 
COPYRIGHT/DISCLAIMER | CONTACT US