I need to write function that will accept array of decimals and it will find the median.
Is there a function in the .net Math library?
Math.NET is an opensource library that offers a method for calculating the Median. The nuget package is called MathNet.Numerics.
The usage is pretty simple:
using MathNet.Numerics.Statistics; IEnumerable data; double median = data.Median();