CSharp examples for System:Array Slice
Remove First from array
// Copyright (c) Microsoft. All rights reserved. using System.Runtime.CompilerServices; using System.Collections.ObjectModel; using System.Collections.Generic; using System.Diagnostics.Contracts; public class Main{ public static T[] RemoveFirst<T>(this T[] array) {//from ww w .ja v a 2 s.c o m T[] result = new T[array.Length - 1]; Array.Copy(array, 1, result, 0, result.Length); return result; } }