COMMAND LINE ARGUMENTS IN C-SHARP

Command line arguments are parameters supplied to Main method at the time of invoking it for execution.

Example:
using System;
class cmdline;
{
 public static void Main(string[] args)
  {
  Console.Write("Welcome");
  Console.Write(" "+args[0]);
  Console.WriteLine(" "+args[1]);
  }
}

In the above example Main is declared with a parameter args. The two arguments assigned to the array are as:
Mr. ------------------->args[0]
Programmer--------->args[1]

the output will be.
Welcome Mr. Programmer

No comments:

Post a Comment

SUBNETTING

  SUBNETTING Class A Address N H H H Class B Address N N H H Class C Address N N N H   Formula 2 N Where N is equal to number of bits borrow...