Answers for "how to know that from where the parameter is getting arguments in c#"

C#
0

C# params

public static void UseParams(params int[] list)
    {
        for (int i = 0; i < list.Length; i++)
        {
            Console.Write(list[i] + " ");
        }
        Console.WriteLine();
    }

    public static void UseParams2(params object[] list)
    {
        for (int i = 0; i < list.Length; i++)
        {
            Console.Write(list[i] + " ");
        }
        Console.WriteLine();
    }
Posted by: Guest on August-27-2021
0

how to input parameters in c#

static void MyMethod(string fname) 
{
  Console.WriteLine(fname + " Refsnes");
}
//If the code is already in a static you won't need to put static infront of it
Posted by: Guest on May-12-2021

Code answers related to "how to know that from where the parameter is getting arguments in c#"

C# Answers by Framework

Browse Popular Code Answers by Language