Check if iv reached my maxed slots in an array, in c#.

I have a split string that gets stored inside an array, and after it checks a word, it moves down on the array index list. I wanna check where the end is/ When or if iv reached the max amount of slots or indexes. And if there are no more words, do something. if there are, continue. That kinda idea.
Thank you in advance. Have a wonderful day and a happy new year.

If you’re moving down the array, simply check that your index is still i >= 0

If you’re moving up the array, check that the index is i < yourArray.Length

To check that there are any elements left in the array, you can use yourArray.Length > 0 or yourArray.Any() if you use linq.