A delegate is a type safe function pointer, it holds a reference to a function. The signature of the delegate must match the signature of the function, the delegate points to. A delegate is similar to a class and we can create an instance of it. Delegates are mainly used for communication and callbacks.
Delegates provide two way communication.
We can use multi cast delegates when we need to reference more than one function. When we invoke a multi-cast delegate, all the functions the delegate is pointing to, are invoked.
Subscribe to:
Post Comments (Atom)
Call a function in child component from parent component in React
Consider the following parent component class Parent extends React.Component { constructor(props) { super(props); thi...
-
The process of replacing a module with generic and mostly empty object, called a mock. Advantages: Isolates our code from its dependen...
-
Common Language Runtime or CLR is the run-time execution environment of .Net Framework. Converting MS-IL into platform or OS specific code ...
-
An object is an entity that has Properties for identifying State, Methods for behavior, Events for depicting the change of State. Data ass...
No comments:
Post a Comment