My 5 cents (because it appears more straightforward/simpler and sufficient for short lists):
public static T Median<T>(this IEnumerable<T> items)
{
var i = (int)Math.Ceiling((double)(items.Count() - 1) / 2);
if (i >= 0)
{
var values = items.ToList();
values.Sort();
return values[i];
}
return default(T);
}
P.S. using "higher median" as described by ShitalShah.