Median in .NET

dotnet add package MathNet.Numerics

MathNet.Numerics.Statistics.Statistics.Median(nums)