Skip to content

Commit 1ab103f

Browse files
shethaaditAdit Sheth
and
Adit Sheth
authored
Fixed bug 34928. (#44584)
Co-authored-by: Adit Sheth <[email protected]>
1 parent a5f225f commit 1ab103f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/fsharp/language-reference/parameters-and-arguments.md

+2
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ Occasionally it is necessary to define a function that takes an arbitrary number
214214

215215
In F#, parameter arrays can only be defined in methods. They cannot be used in standalone functions or functions that are defined in modules.
216216

217+
However, functions like `printfn` achieve similar behavior by using format specifiers and type inference to handle multiple arguments dynamically. The `printfn` function does not rely on parameter arrays; instead, it uses F#'s type-safe formatting mechanism to process varying numbers of arguments while ensuring compile-time type checking.
218+
217219
You define a parameter array by using the `ParamArray` attribute. The `ParamArray` attribute can only be applied to the last parameter.
218220

219221
The following code illustrates both calling a .NET method that takes a parameter array and the definition of a type in F# that has a method that takes a parameter array.

0 commit comments

Comments
 (0)