错误:索引超出范围。我该如何解决? [英] Error: Index was out of range. How do I solve it ?

查看:1516
本文介绍了错误:索引超出范围。我该如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:索引超出范围。必须是非负数且小于集合的大小。参数名称:index。当我在gridview上选择最后一行来更新数据时出现此错误

解决方案

这种情况可能是最简单的调试。在调试器下运行它并找到引发异常的行。如果将显示您通过索引访问某些内容的行。期待它的价值。



这就是全部。



-SA

Error: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index . I got this error when I was selecting last row on gridview to update the data

解决方案

This case is probably the simplest for debugging. Run it under the debugger and locate the line where the exception is thrown. If will show the line where you access something by index. Expect its value.

That's all.

—SA


这篇关于错误:索引超出范围。我该如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆