int[] list = {1, 2, 3, 4, 5, 6};
Func<int[], string> checkArray = array =>
[1, ..var middle, 6] => $"The first element is 1, the middle is {middle}, the last one is 6",
[1, .., > 2] => "The first element is 1 and the last one is bigger than 2",
Console.WriteLine(checkArray(list));