using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SumIntArray
{
publicclass Class1
{
publicint Sum()
{
stringdata = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10";
string[]vs = data.Split(new string[]{","}, StringSplitOptions.RemoveEmptyEntries);
varresult = from d invs
select d;
intcount = 0;
foreach(string s inresult)
count += int.Parse(s);
Console.WriteLine(count+ "/n");
return0;
}
}
}