C#报错之索引越界

268 阅读1分钟

使用语言:C#

环境:.net core (其他的环境也一样)

Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.\

他的翻译结果:未处理的异常:System.ArgumentOutOfRangeException:索引超出范围。 必须是非负数且小于集合的大小。

所以是索引越界问题,我们要去将数组的位置增大。

\

。。