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 8650769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:54:08+00:00 2026-06-12T13:54:08+00:00

base on msdn pages, when we declare a delegate we do need to specify

  • 0

base on msdn pages, when we declare a delegate we do need to specify return value and also argument of the method that would be called via delegate.

my question:

let’s say I have a method as:

public int MethodA(bool bValue) and also void MethodB(int iValue)

Do I need to declare two different delegates here for each method or I can do it using one?

Thanks.

  • 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-12T13:54:10+00:00Added an answer on June 12, 2026 at 1:54 pm

    Do I need to declare two different delegates here for each method or I can do it using one?

    Since these methods have completely different signatures, you need different delegates. However, you can use the built-in Func<bool, int> and Action<int> delegates instead of declaring your own delegate types.

    For example, you could use:

    Func<bool,int> delegateA = this.MethodA;
    
    Action<int> delegateB = this.MethodB;
    // or:  Action<int> delegateB = new Action<int>(this.MethodB);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the method described in the MSDN for registering a Windows Service (ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/dllproc/base/createservice.htm) and
I have a base form class that contains a method that returns a DataTable:
MSDN: BaseOutputPath : Specifies the base path for the output file. If it is
My base class has properties that are used by a subclass. where should Release
According to this page on MSDN, the Key Value for Left Control is 162.
http://msdn.microsoft.com/en-us/library/435f1dw2.aspx public class Base { public string Field; } public class Child : Base
I am following MSDN guideline of implementing a Dispose Method . I've written my
I was reading the following blogs about ASP.Net Async pages http://msdn.microsoft.com/en-us/magazine/cc163725.aspx http://world.episerver.com/Blogs/Magnus-Rahl/Dates/2012/1/Async-Pages-part-3-Async-Pages-with-databinding-and-events/ And a
Hi i using this article as my app base. https://blogs.msdn.com/hammett/archive/2009/04/23/mef-and-asp-net-mvc-sample.aspx In my UI.master file
From ReadProcessMemory in MSDN: lpBaseAddress [in] : A pointer to the base address in

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.