# keep 10% of an array?

hey! i have this huge list of arrays:

[82172-vec3.jpg*|82172]

in my

`````` public Vector3[]    paths;
``````

but i wanna kick out some of them. so that i keep 10% of that. how can i do this? i thought i can use a % operator (Arithmetic operators - C# reference | Microsoft Learn) like this:

`````` optimizedpoints = new Vector3[paths.Length%10];

int j = 0;

for (int i = 0; i < paths.Length; i%=10) {
optimizedpoints[j] = paths*;*
``````

j++;
}

but that seams to be wrong somehow? do someone know why?
*

I used your code as the base:

``````void CreateNewArray()
{
int nStep = 10;
optimizedArray = new Vector3[originalArray.Length / nStep + 1];

int j = 0;
for (int i = 0; i < originalArray.Length; i += nStep)
{
optimizedArray[j] = originalArray*;*
``````

j++;
}
}
I wouldnâ€™t do it like this, personally. I would just use Lists, so much more convenient.
Like so:
void WithoutLinq()
{
int nStep = 10;
List optimizedList = new List();
for (int i = 0; i < originalArray.Length; i += nStep)
{