About 50 results
Open links in new tab
  1. Delegates in C# - Stack Overflow

    A delegate is a references type that invokes single/multiple method (s)through the delegate instance. It holds a reference of the methods.Delegates can be used to handle (call/invoke) multiple methods on …

  2. How to use delegates in correct way / Understanding delegates

    The only way to create/use a delegate was to define your own new delegate type (or find/guess some suitable one somewhere deep in the system's namespaces). Keep in mind that every new delegate …

  3. c# - What is the difference between lambdas and delegates in the .NET ...

    A delegate is a Queue of function pointers, invoking a delegate may invoke multiple methods. A lambda is essentially an anonymous method declaration which may be interpreted by the compiler differently, …

  4. What is the difference between Func<string,string> and delegate?

    May 24, 2016 · A. Func<string, string> convertMethod = lambda B. public delegate string convertMethod(string value); I'm uncertain of what actually the difference between these two are. Are …

  5. oop - What is Delegate? - Stack Overflow

    Delegate types are sealed—they cannot be derived. Because the instantiated delegate is an object, it can be passed as a parameter, or assigned to a property. This allows a method to accept a delegate …

  6. How does the + operator work for combining delegates?

    Jul 22, 2015 · A delegate can call more than one method when invoked. This is referred to as multicasting. To add an extra method to the delegate's list of methods—the invocation list—simply …

  7. What is a C++ delegate? - Stack Overflow

    Dec 30, 2012 · A delegate is a class that wraps a pointer or reference to an object instance, a member method of that object's class to be called on that object instance, and provides a method to trigger …

  8. Is it possible to use ref types in C# built-in Action<> delegate?

    Nov 13, 2011 · No, you can't use pass-by-reference with the Action delegates. While there is a concept of "type passed by reference" as a Type in the framework, it's not really a type in the normal sense …

  9. What is the "correct" way to initialize a C# delegate?

    The method name will (at least should) however give me a good idea of what's going to happen when the delegate is invoked and in the second option I don't have to search for the method name. As a …

  10. c# - When & why to use delegates? - Stack Overflow

    Jan 7, 2010 · A delegate is a simple class that is used to point to methods with a specific signature, becoming essentially a type-safe function pointer. A delegate's purpose is to facilitate a call back to …