Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 重复使用相同的数据名_.net_Vb.net_Foreach - Fatal编程技术网

.net 重复使用相同的数据名

.net 重复使用相同的数据名,.net,vb.net,foreach,.net,Vb.net,Foreach,我如何仅从一楼迭代数据 For Each dtrow in CameraDtable.Rows 'get datas only from 1F Next 或 “选择*FROM tableName WHERE Floor='1F'”或thislool()作为DataRow=CameraDtable。选择(“Floor=1F”)如何将其放在每个的上?如果创建DT,那么它a)首先只有您想要的楼层,或者b)过滤到1F的行,然后在For循环之外执行,然后迭代每一行-它们都是1F。或者保持现有状态


我如何仅从一楼迭代数据

For Each dtrow in CameraDtable.Rows
    'get datas only from 1F
Next


“选择*FROM tableName WHERE Floor='1F'”或
thislool()作为DataRow=CameraDtable。选择(“Floor=1F”)
如何将其放在每个
上?如果创建DT,那么它a)首先只有您想要的楼层,或者b)过滤到1F的行,然后在For循环之外执行,然后迭代每一行-它们都是1F。或者保持现有状态,并添加一个if:if类似于
if dtRow.Floor=“1F”的选项,然后…
选项3起作用,选项2如何?我不会编码。我觉得这样更好,你为什么不加上这个作为答案呢?
For Each dtrow In FbuildingSettings.camButtonDtable.Select("Floor ='1'")
    ' do code
Next
For Each dtrow In FbuildingSettings.camButtonDtable.Rows
If dtrow("Floor") = 1 Then
    ' do code
End If
Next