стоит 200к в годтоже может прокатить
if (item != null
&& item.GetType().GetInterfaces().Any(
i => i.IsGenericType
&& i.GetGenericTypeDefinition() == typeof(IEnumerable<>))
)
{
IEnumerable<object> collection = (IEnumerable<object>)item;
} class ArrayComparer : IComparer<int[]>
{
public int Compare(int[] x, int[] y)
{
if (x is null || y is null) throw new ArgumentNullException();
if (x.Length < 2 || y.Length < 2) throw new ArgumentException("Сравниваемые массивы должны иметь минимум 2 элемента");
int comparisonResult = x[0].CompareTo(y[0]);
if (comparisonResult == 0) comparisonResult = x[1].CompareTo(y[1]);
return comparisonResult;
}
} a[0] < b[0] || (a[0] == b[0] && a[1] < b[1]). Не специалист по C#, но возможно массивы уже так и сравниваются там.