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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:37:42+00:00 2026-05-25T19:37:42+00:00

Since Javascript is the language that I am the most proficient at, I am

  • 0

Since Javascript is the language that I am the most proficient at, I am familiar with using functions as first-class objects. I had thought that C# lacked this feature, but then I heard about Func and Action and delegate, which I think are pretty awesomesauce.

For example, you can declare a Func that concatenates two strings and puts a space between them like this:

Func<string, string, string> concat = (a,b) => a + " " + b;

I noticed that when you type

Func<

the IntelliSense shows that it has 17 overloads:

delegate System.Func<out TResult>
delegate System.Func<in T, out TResult>
delegate System.Func<in T1, in T2, out TResult>
...snip...
delegate System.Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, in T15, in T16, out TResult>

That made me laugh. I looked at the MSDN docs for Func and laughed again. This made me try to declare a Func with 17 arguments. It causes an error (Using the generic type 'System.Func<TResult>' requires 1 type arguments).

I can agree that it’s probably not a good idea to have a Func that accepts more than 16 arguments. Even so, this seems like a kludgy way for Func to be implemented. It requires 17 trivially different overloads to be documented. This is all it really should need to know: the last type parameter is the return type, and all the type parameters before it are the argument types.

So what could I do if I wanted to create a Func with more than 16 parameters? Why is there a limit anyway? Why can’t C# just let you declare a Func with an arbitrary number of arguments?

  • 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-05-25T19:37:43+00:00Added an answer on May 25, 2026 at 7:37 pm

    You’re hoping for something like variadic type arguments which C# lacks. C# requires the arity of generic types to be fixed, therefore the heinous proliferation of Func, Action, and Tuple types.

    If you’re language shopping, this feature was added in C++11, but you should probably just use jQuery. 🙂

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

Sidebar

Related Questions

I am building an application where most of the HTML is built using javascript.
I'm looking for a higher-level language that writes out javascript. in other words the
Are there any tests that compare Javascript's performance with Java's? UPDATE: Since everyone is
Since JavaScript is not derived from Java, why does it have Java in the
Since Actionscript is a proper superset of javascript, it should I suppose be possible.
Since I installed IE8 (Win XP) Visual Studio 2008 Pro stopped deebugging javascript. When
Javascript's getTime() method returns the number of milliseconds since midnight of January 1, 1970.
Since I've started to use jQuery, I have been doing a lot more JavaScript
Since I started studying object-oriented programming, I frequently read articles/blogs saying functions are better,
Since CS3 doesn't have a web service component, as previous versions had, is there

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.