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

  • Home
  • SEARCH
  • 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 4015858
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:40:12+00:00 2026-05-20T09:40:12+00:00

Everytime I need a very small Method that only uses its parameters… Should I

  • 0

Everytime I need a very small Method that only uses its parameters…

Should I use declare a Delegate or a Method?

Eg: Multiply three numbers

Func<int, int, int, int> Multiply = (a,b,c) => a*b*c;

and

int Multiply(int a, int b, int c) 
{
    return a*b*c;
}

Edit:

I want to focus this question in terms of eficiency when compiling, and readability.

  • 1 1 Answer
  • 3 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-05-20T09:40:12+00:00Added an answer on May 20, 2026 at 9:40 am

    I wouldn’t declare a delegate rather than a method just for the sake of it. If you’re just to call this directly from other code in your class, a method is more idiomatic. If it doesn’t need to use any instance variables, you may want to make it a static method to make that clear.

    On the other hand, if you only ever need to use it as a delegate, use a lambda expression to create that delegate (as per your first example).

    If you want to call it directly and use it as a delegate, you can use a method group conversion to create a delegate easily:

    int d = Multiply(a, b, c); // Normal method invocation
    DoSomethingWithFunction(values, Multiply); // Method group conversion
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's very pointless and troublesome that everytime that you need to concatenate two strings
I have created a custom ImageView and in its onDraw method I need to
I'm using zend framework. currently everytime I need to use the db I go
I don't edit CSS very often, and almost every time I need to go
Everytime the program loads, I need a dictionary to have about 15 values. Right
I am using xcode with emacs. But everytime I start emacs, I need to
I very often need to do some Emacs magic on some files and I
I'm very sorry about this being a very cliché question, but I really need
i am learning extension method, a very handy feature, which can save number of
I am using a database that I need to access in all activities. So

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.