What is the maximum number of parameters for a method (WebApi?)

I have this method in WebApi

[IHttpActionResult]
[Get]
public void GetSome(P1, P2 ....... Pn)
{
   ...///
}

Just curious:

Any ideas what is the maximum number of parameters allowed by WebApi for this method?

+4
source share
2 answers

Do you mean technically or practically ?: P

The C # method parameter limit is 65,535. Most browsers only support URLs of 2,000 to 4,000 characters. Depending on the consumer of your API, there may be some restrictions.

But most importantly: what are you trying to do? Seriously?

API, , , . , 65000 .

1 "OMG kill this code" lane:)

+9

Q & A Internet Stack overflow. C# Method maximum number of parameters. .

:

  • .net, 16383, , (!)
  • .net, 16384 , , .
  • .net, 50000 , , StackOverflowException.
  • .net, 100000 csc.exe, , stating that the resulting expression is too long or complex to handle.

:

  • operating system computer.

  • . .

Q A:

#

#

.

+2

All Articles