解释代码的含义 [英] Explain the meaning of the code
本文介绍了解释代码的含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于 i = 0 0 ).行数- 0 ).Rows(i).Item( 0 ))
下一步
此代码是什么意思,另一个是什么?您能解释一下这两个代码有什么区别吗?
对于,i = 0 收件人 dt.Tables( 0 ).Rows.Count- 1
MsgBox(dt.Tables( 0 ).Rows(i).Item( 0 ))
下一个
解决方案
两个代码块的工作原理相同.该代码将显示一个messagebox
,最多显示dataset(ds)
或datatable(dt)
的行数(1,2,3,4 ....)
区别仅在于dataset
和datatable
.
谢谢
Ashish
这两个代码是相同的,看起来ds和dt都意味着相同,即数据集.
这段代码将为您提供msgbox中数据表每一行中第一列的值.您正在显示数据集中的数据.
For i = 0 To ds.Tables(0).Rows.Count - 1
MsgBox(ds.Tables(0).Rows(i).Item(0))
Next
What does this code mean and the other one? Can you explain what is the difference between this two code.
For i = 0 To dt.Tables(0).Rows.Count - 1
MsgBox(dt.Tables(0).Rows(i).Item(0))
Next
解决方案
Both Code Block works same. The code will display amessagebox
showing count(1,2,3,4....) upto rows count of adataset(ds)
ordatatable(dt)
The difference is only of thedataset
anddatatable
.
Thanks
Ashish
Both the codes are same and it looks like ds and dt both means the same i.e, dataset.
This code will give you value of first column in each row of your datatable in msgbox
The only difference is ds and dt but its the same a dataset. You are displaying data from a dataset.
这篇关于解释代码的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文