SyntaxFix
Write A Post
Hire A Developer
Questions
// I'd modify this slightly to be more resilient to a bad parameter // it will handle your case and better handle other cases given to it: int index = 25; if (index >= 0 && index < array.Length) { // Array element found }