数据表的接入小区的价值 [英] Access cell value of datatable

查看:103
本文介绍了数据表的接入小区的价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能帮我如何访问在第4列第一个单元格的例子价值?

  A B C D
1 2 3 5
克正M L

例如,如何访问到值d,如果这将是数据表?

感谢。


解决方案

  d.Rows [0] [3]

  d.Rows [0] .ItemArray [3]

应该这样做。

索引是基于0所以我们首先访问第一行(0),然后在该行中的第4列(3)

Can anyone help me how to access for example value of first cell in 4th column?

a b c d
1 2 3 5
g n m l

for example, how to access to value d, if that would be datatable?

Thanks.

解决方案

d.Rows[0][3]

or

d.Rows[0].ItemArray[3]

Should do it

Indexes are 0 based so we first access the first row (0) and then the 4th column in this row (3)

这篇关于数据表的接入小区的价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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