using System; using System.Linq; class RemoveLastElement { static void Main() { int[] a = { 2, 3, 4, 5, 6}; int[] result = a.SkipLast(1).ToArray(); Console.WriteLine(String.Join(",", result)); } }