Library tutorials & articles
Exploring Delegates
- Introduction
- An Example
- Running the example
- Assembly Code
Introduction
Delegates are a kind of type safe function pointers which are actually declared
as class derived from System.MulticastDelegate. There are few rules
how to write that class. First you must declare .ctor and Invoke methods, if
you like to have asynchronous callback involved there are two more methods just
for that case BeginInvoke and EndInvoke. Except for these two or four methods
nothing else should be declared and these declarations must be without implementation
(empty body). This is what it looks like: .method public hidebysig specialname rtspecialname
instance void .ctor(object 'object',
native int 'method') runtime managed
{
} // end of method WildCard::.ctor
.method public hidebysig virtual instance int32
Invoke() runtime managed
{
} // end of method WildCard::Invoke
Related articles
Related discussion
-
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
by virtualking (0 replies)
-
How to optimize mysql subquery performance?
by Jayaram P (0 replies)
-
C# video Editing/rendering
by pkuchaliya (0 replies)
-
How to Fill DataSet with more records (around 1 lakh) in a faster way
by Jayaram P (0 replies)
-
Can't print on the network with MSADESS ??
by anatha1 (2 replies)
Related podcasts
-
Object-Oriented Programming in Ruby
In this episode, I talk with Scott Bellware about object-oriented programming in Ruby, and Ruby's object model. This is taken from a private conversation, and the audio quality suffers at times. Much thanks to Scott for allowing this to be released.This episode of the Alt.NET Podcast is bro...
This thread is for discussions of Exploring Delegates.