title: Anything like the c# params in c++?
body: <p>That is the question.</p>
  <h4>Background: <a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/params" rel="nofollow noreferrer">C# Params</a></h4>
  <p>In C#, you can declare the last parameter in a method / function as 'params', which must be a single-dimension array, e.g.:</p>
  <pre><code>public void SomeMethod(int fixedParam, params string[] variableParams)
  {
     if (variableParams != null)
     {
          foreach(var item in variableParams)
          {
              Console.WriteLine(item);
          }
     }
  }
  </code></pre>
  <p>This then essentially allows syntactic sugar at the call site to implicitly build an array of zero or more elements:</p>
  <pre><code>SomeMethod(1234); // &lt;&lt; Zero variableParams
  SomeMethod(1234, &quot;Foo&quot;, &quot;Bar&quot;, &quot;Baz&quot;); // &lt;&lt; 3 variableParams
  </code></pre>
  <p>It is however still permissable to bypass the sugar and pass an array explicitly:</p>
  <pre><code>SomeMethod(1234, new []{&quot;Foo&quot;, &quot;Bar&quot;, &quot;Baz&quot;});
  </code></pre>