开发者

What is the difference between Index Out of Range Exception and Index Outside the Bounds of Array Exception?

Is there any 开发者_如何学编程difference between "Index was out of range exception" and "Index was outside the bounds of the array exception"?


They're exactly the same thing.

IndexOutOfRangeException is the name of the exception class that is thrown. Its description is given by Visual Studio as "Index was outside the bounds of the array."

This exception is thrown when an attempt is made to access an element of an array with an index that is outside of the bounds of the array.


Note that the IndexOutOfBoundsException class is not part of C# at all, but rather the Java language (or Microsoft's implementation, J#).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜