Params - Passing multiple arguments in C#

Params allows user to give multiple arguments.(usually in array)

This is the example code for params.

Note:
Console.Write is used here instead of Console.WriteLine to give the oneline output.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ConsoleApplication3
{
    class Program
    {
        static private void paramTest(string name, params int[] list)
        {
            Console.Write("\n" + name);
            foreach (int i in list)
            {
                Console.Write(i);
            }
        }
        static void Main(string[] args)
        {
           paramTest("c# param",1,2);
           paramTest("again", 1, 2, 3, 4, 5);
                                      
           
        }
    }
}


output:
c# param12
again12345