Sub Generic Array - CSharp System

CSharp examples for System:Array Operation

Description

Sub Generic Array

Demo Code


using System;//from ww  w.j av a2 s .  co  m

public class Main{
        public static T[] SubArray<T>(this T[] source, int index, int length)
        {
            var result = new T[length];
            Array.Copy(source, index, result, 0, length);
            return result;
        }
}

Related Tutorials