mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-26 15:13:56 +00:00
commit
6688c27025
@ -653,10 +653,10 @@ on a new line! ""Wow!"", the masses cried";
|
|||||||
return ++count;
|
return ++count;
|
||||||
}
|
}
|
||||||
|
|
||||||
// A delegate is a reference to a method
|
// A delegate is a reference to a method.
|
||||||
// To reference the Increment method,
|
// To reference the Increment method,
|
||||||
// first declare a delegate with the same signature
|
// first declare a delegate with the same signature,
|
||||||
// ie. takes no arguments and returns an int
|
// i.e. takes no arguments and returns an int
|
||||||
public delegate int IncrementDelegate();
|
public delegate int IncrementDelegate();
|
||||||
|
|
||||||
// An event can also be used to trigger delegates
|
// An event can also be used to trigger delegates
|
||||||
|
Loading…
Reference in New Issue
Block a user