Created
November 15, 2016 14:07
-
-
Save Torxed/ee0ebb358fcd772bb3f3589251f3df5a to your computer and use it in GitHub Desktop.
test.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static T[] RemoveAt<T>(this T[] source, int index) | |
{ | |
T[] dest = new T[source.Length - 1]; | |
if( index > 0 ) | |
Array.Copy(source, 0, dest, 0, index); | |
if( index < source.Length - 1 ) | |
Array.Copy(source, index + 1, dest, index, source.Length - index - 1); | |
return dest; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment