Published
- 1 min read
how to check if list index is out of range in c#
The solution for this is noted below
how to check if list index is out of range in c#
Solution
if(index >= 0 && index < array.Length)
{
//it exists
}
Try other methods by searching on the site. That is if this doesn’t work