Passing zero arguments as params -- where the behaviour is defined?

Posted by macias on Stack Overflow See other posts from Stack Overflow or by macias
Published on 2010-05-31T07:38:15Z Indexed on 2010/05/31 7:42 UTC
Read the original article Hit count: 269

Filed under:
|
|
|

C# spec. allows you to call a function

void foo(params int[] x)

with zero parameters. However, I didn't find in C# Lang. Spec. a word on further behaviour -- will foo get empty array or null reference? I checked also MSDN -- nothing.

Where the behaviour is defined?

NOTE: I am not asking how VS behaves, I am asking about design of the language.

© Stack Overflow or respective owner

Related posts about c#

Related posts about arguments