Sum Of Main Method Arguments - CSharp Custom Type

CSharp examples for Custom Type:Method Parameter

Description

Sum Of Main Method Arguments

Demo Code

using System;//from ww w  .  j  a  v  a  2  s .  c  o m
class SumOfArguments
{
   public static void Main(string[] args)
   {
      int x;
      int y;
      x = Convert.ToInt32(args[0]);
      y = Convert.ToInt32(args[1]);
      Console.WriteLine("The sum of the two arguments is: {0}", (x+y));
   }
}

Result


Related Tutorials