Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A delegate in C# is similar to a function pointer in C.
- And using a delegate allows a programmer to encapsulate a reference to a method inside a delegate.
- The delegate object can then be passed to code which can call the reference without knowing without having to know at compile time which method will be known.
- A very interesting property of a delegate is that it does not care about the object of the class. That it references. All matters is that methods argument type and
- object return type match the delegates.
- Creating the instance and invocation.
Add Comment
Please, Sign In to add comment