Concept Flow - Array bounds checking behavior
Start: Access array element
Check index >= 0 and < array.Length?
No→Throw IndexOutOfRangeException
Yes
Return element at index
End
When accessing an array element, C# checks if the index is within valid bounds. If not, it throws an exception; otherwise, it returns the element.