СП
Случайный Прохожий
using System;
namespace ConsoleApplication40
{
class Program
{
static void Cut(ref int[] array, int startIndex, int numberOfElements)
{
int[] tempArr = new int[array.Length-numberOfElements];
int counter = 0;
for (int j = 0; j < startIndex; j++)
{
tempArr[counter++] = array[j];
}
for (int j = startIndex+numberOfElements; j < array.Length; j++)
{
tempArr[counter++] = array[j];
}
array = tempArr;
}
static void Main()
{
int[] arr = { 1, 2, 3, 4, 5, 6, 7 };
Cut(ref arr, 1, 5);
for (int j = 0; j < arr.Length; j++)
Console.WriteLine(arr[j]);
Console.ReadKey();
}
}
}