Average method (with integers)
Description
The Average method calculates the average value for a numeric sequence.
Sample
This sample calculates the average value a list of integers.
var data := List<int>{} { 5, 3, 1, 2, 4 }
var result := data:Average()
Console.WriteLine(result)
Output
3
Complete sample
using System
using System.Linq
using System.Collections.Generic
procedure Execute() as void strict
var data := List<int>{} { 5, 3, 1, 2, 4 }
var result := data:Average()
Console.WriteLine(result)
return