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

    As a side note, the delegate will also hold a reference to the object instance - "this" - even after all other references to the class a removed. Therefore, to ensure that a class is garbage collected, all …

  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. 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 …

  5. c# - += operator for Delegate - Stack Overflow

    A delegate is a data structure that refers to one or more methods. For instance methods, it also refers to their corresponding object instances. The closest equivalent of a delegate in C or C++ is a function …

  6. 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 …

  7. 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 …

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

    What is the "correct" way to initialize a C# delegate? Ask Question Asked 15 years, 6 months ago Modified 4 years, 4 months ago

  9. Why do we need C# delegates - Stack Overflow

    Nov 26, 2010 · Further, while the number of classes one would need when using pseudo-delegates would be greater than when using "real" delegates, each pseudo-delegate would only need to hold a …

  10. 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 …