Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8885771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:23:30+00:00 2026-06-14T21:23:30+00:00

For example: delegate void SomeDelegate(); SomeDelegate a = new SomeDelegate( () => Console.WriteLine(A) );

  • 0

For example:

delegate void SomeDelegate();

SomeDelegate a = new SomeDelegate( () => Console.WriteLine("A") );
SomeDelegate b = new SomeDelegate( () => Console.WriteLine("B") );

SomeDelegate c = a + b;

In the last line, what does a + b translate to? I’m just curious how I would add them without using the + operator.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:23:31+00:00Added an answer on June 14, 2026 at 9:23 pm

    http://msdn.microsoft.com/en-us/library/ms173172(v=VS.80).aspx – Search for addition:

    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 requires adding two
    delegates using the addition or addition assignment operators (‘+’ or
    ‘+=’). For example:

    MethodClass obj = new MethodClass(); 
    Del d1 = obj.Method1; 
    Del d2 = obj.Method2; 
    Del d3 = DelegateMethod;
    
    //Both types of assignment are valid. 
    Del allMethodsDelegate = d1 + d2; 
    allMethodsDelegate += d3;
    

    At this point allMethodsDelegate contains three methods in its
    invocation list—Method1, Method2, and DelegateMethod. The original
    three delegates, d1, d2, and d3, remain unchanged. When
    allMethodsDelegate is invoked, all three methods are called in order.
    If the delegate uses reference parameters, the reference is passed
    sequentially to each of the three methods in turn, and any changes by
    one method are visible to the next method. When any of the methods
    throws an exception that is not caught within the method, that
    exception is passed to the caller of the delegate and no subsequent
    methods in the invocation list are called.

    Update

    Both delegates derive from System.Delegate You can use the combine() methods to add two delegates together.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to make a Func delegate an extension method? For example, just
In the following console application example, the event is defined like this: public delegate
What does the syntax &function_name mean? For example, as used in the delegate System::ComponentModel::DoWorkEventHandler(this,
A complete example public delegate void mouseup_delegate(object obj, MouseButtonEventArgs args); constructor() { TextBlock text_block
Let's say that I have the following delegate: public delegate void Example(); and a
I'm trying to implement a delegate class following Herb Sutter's Example . There is
Example CSS #wrap{margin:20px} Code prettify wraps the whole line in .com <span class=com>#wrap{margin:20px}</span> Somebody
In CLR via C# , Jeffrey Richter gives the following example of delegate chaining
class Program { public delegate void VoidMethodDelegate(); public delegate int IntMethodDelegate(); static void Main(string[]
I have this method: private delegate void watcherReader(StreamReader sr); private void watchProc(StreamReader sr) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.