This would be question from c# beginner. When I create console application I get Main method with parameter args as array string. I do not understand how t
in visual studio you can also do like that to pass simply or avoiding from comandline argument
static void Main(string[] args)
{
if (args == null)
{
Console.WriteLine("args is null"); // Check for null array
}
else
{
args=new string[2];
args[0] = "welcome in";
args[1] = "www.overflow.com";
Console.Write("args length is ");
Console.WriteLine(args.Length); // Write array length
for (int i = 0; i < args.Length; i++) // Loop through array
{
string argument = args[i];
Console.Write("args index ");
Console.Write(i); // Write index
Console.Write(" is [");
Console.Write(argument); // Write string
Console.WriteLine("]");
}
}