CSharp examples for System:Array Create
Create a new array by removing given amount of element on the right.
// Permission is hereby granted, free of charge, to any person obtaining a copy using System;/*from w ww .ja va 2s . c om*/ public class Main{ /// <summary> /// Create a new array by removing given amount of element on the right. /// </summary> public static T[] TrimRight<T> (T[] array, int amount) { T[] result = new T[array.Length - amount]; Array.Copy (array, 0, result, 0, result.Length); return result; } }