public static void FindMedian() { int count = numbers.Count; double median = 0; if (count % 2 == 0) { var firstMed = numbers[count / 2]; var secondMed = numbers[count / 2 - 1]; median = (double)(firstMed + secondMed) / 2; } else { median = numbers.AsList()[(count - 1) / 2]; } result.Add(median); }
public List <IEntity> GetAll() { return(data.AsList().ToList()); }