试图搜索表中不可用的行号 [英] Trying to search for the row number that's not available in the table

查看:92
本文介绍了试图搜索表中不可用的行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

表格中只有5行10列。但是当我运行测试时,测试失败了,因为它正在查找15行和2列(并且表中没有第15行)。 

There are only 5 rows and 10 columns in the table. But when I run the test, the test is failing because it is looking for the 15 row and 2 column (and there  is no 15th row in the table). 

不确定为什么要寻找第15行索引。以下是我的代码

Not sure why its looking for 15th row index. Here is my code below

请任何人请给我一些建议

Please could any one please give me some suggestions to 

解决此问题。 

 相同的代码适用于我的其他表格应用。   谢谢

 The same code works for other tables in my application.   Thank you

PV

推荐答案

嗨PV,

请输出 rowcount的,  row_num 检查一下?如果实际的行号为5,则不应该查找超过该行的行索引。

May you please output the value of rowcount, row_num to have a check? If the real Row number is 5, it's not supposed to look for row index which is more than that.

您可以使用 Console.WriteLine()方法就在
for
语句之前。

You could use Console.WriteLine() method just before the for statement.

期待您的回复。

 

 

祝你好运,

弗莱彻


这篇关于试图搜索表中不可用的行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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