I am kind of new with C# and I was wondering if there is a function to remove specific values (0) at the end of an array of float?

For example:

```
float[] samples = {0.0, 4.0, 2.5, ..., 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};

```

after the call I want my samples to be:

```
samples == {0.0, 4.0, 2.5, ..., 2.0}

```

Thank you for your help