This article has been dead for over three months
You
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LINQTesting
{
class Program
{
static void Main(string[] args)
{
int[] MyAr = { 1, 2, 7, 4, 8, 3, -1, 9, -7, 3, 2, 5 };
var MySum = MyAr.Sum();
var MyMax = MyAr.Max();
var MyMin = MyAr.Min<int>(); // if MyAr is not an integer array this will not work
Console.WriteLine("Sum is: {0}, Maximum is: {1}, Minimum is: {2}", MySum, MyMax, MyMin);
Console.ReadKey();
}
}
}