Copy Of Range of array - CSharp System

CSharp examples for System:Array Element

Description

Copy Of Range of array

Demo Code


using System.Text;
using System.Runtime.InteropServices;
using System.Reflection.Emit;
using System.Reflection;
using System.Linq;
using System.Globalization;
using System.Collections.Generic;
using System.Collections;
using System;/*www  .  j  a  v a2s. com*/

public class Main{
        public static T[] CopyOfRange<T>(T[] source, int from, int to)
        {
            return source.Skip(from).Take(to - from).ToArray();
        }
}

Related Tutorials