Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Average C#

using System;
using System.Linq;
using System.Collections.Generic;
class Demo {
   static void Main() {
      List<int> list = new List<int> { 5, 8, 13, 35, 67 };
      double avg = Queryable.Average(list.AsQueryable());
      Console.WriteLine("Average = "+avg);
   }
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #Average
ADD COMMENT
Topic
Name
4+1 =