Sunday, 22 August 2010

source code using for each loop and using command line argument

// using for each loop and using command line argument using System;
class AddParams
{

//fuusing command line argument
static void Main(string[] args)
{
int sum = 0;
foreach(string str in args)
sum += int.Parse(str);
Console.WriteLine(sum);
}
}

No comments:

Post a Comment