First of all, I don't think you should drop considering PointF at this point, but let me show you why.
If you have this array:
int[,] linePoints;
And you want to remove the "topmost" N elements, and the "bottommost" M elements, you will need to do some work.
Let me show you the code:
void Main()
{
int[,] linePoints =
{
{ -3, -3 },
{ -2, -2 },
{ -1, -1 },
{ 0, 0 },
{ 1, 1 },
{ 2, 2 },
{ 3, 3 },
};
int N = 2;
int M = 2;
// start of the code you're asking for
int width = linePoints.GetLength(1);
int newHeight = linePoints.GetLength(0) - (N + M);
int[,] newLinePoints = new int[newHeight, width];
for (int y = 0; y < newHeight; y++)
for (int x = 0; x < width; x++)
newLinePoints[y, x] = linePoints[N + y, x];
// end of the code you're asking for
linePoints.Dump();
newLinePoints.Dump();
}
Now, let's see how the above code would look if you had used PointF instead.
void Main()
{
PointF[] linePoints =
{
new PointF(-3, -3),
new PointF(-2, -2),
new PointF(-1, -1),
new PointF(0, 0),
new PointF(1, 1),
new PointF(2, 2),
new PointF(3, 3),
};
int N = 2;
int M = 2;
// start of the code you're asking for
PointF[] newLinePoints = linePoints
.Skip(N)
.Take(linePoints.Length - (N + M))
.ToArray();
// end of the code you're asking for
linePoints.Dump();
newLinePoints.Dump();
}
(note: the .Dump() parts there come from the fact that I use LINQPad to test my code.)