Variadic function: Difference between revisions

Content deleted Content added
In C#: Calling conventions
In C#: Additional highlight
Line 57:
[[C Sharp (programming language)|C#]] describes variadic functions using the {{code|params}} keyword. A type must be provided for the arguments, although {{code|object[]}} can be used as a catch-all. At the calling site, you can either list the arguments one by one, or hand over a pre-existing array having the required element type. Using the variadic form is [[Syntactic sugar]] for the latter.
 
<syntaxhighlight lang="c#" highlight="5,16-17,19">
using System;