Average with int array : Average : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » Average »

 

Average with int array








    
 


using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;

public class MainClass {
    public static void Main() {
        IEnumerable<int> intSequence = Enumerable.Range(1, 10);
        foreach (int i in intSequence)
            Console.WriteLine(i);
        double average = intSequence.Average();
        Console.WriteLine("Here is the average:  {0}", average);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» Average