Remove first item of Array

How do i remove the first item of my array?

1 Like

Like this
Arrayvariable = ArrayVariable.Skip(1).ToArray()

Cheers @LarsFeilberg

Hey @Palaniyappan, this does not seem to remove the first item of the Array. When i log the items in the array after your proposed solution, the same first item I’m trying to remove still exists.

1 Like

That would actually work buddy
@LarsFeilberg

Arrayvariable = ArrayVariable.Skip(1).ToArray()

Works perfectly. When using the Skip function the array starts at 1.

2 Likes

From the technical point of view, array has fixed sizes, so doesnt make a lot of sense to use arrays when you need them to have dynamic size, better to use Lists for that…

aaha, that was a big typo mistake…anyhow…great @LarsFeilberg

1 Like

Skip function does not take position as parameter but how many itens you dont want from the start items…

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.