我需要在Visual Basic中运行一些与C#中的代码相同的代码:
for(var item in removeRows)
{
two.ImportRow(item);
}
Run Code Online (Sandbox Code Playgroud)
我知道你最接近在VB中声明"var"的基本上是
Dim something =
Run Code Online (Sandbox Code Playgroud)
但是,你如何在foreach循环中执行此操作?
您只需使用:
For Each item In removeRows
two.ImportRow(item)
Next
Run Code Online (Sandbox Code Playgroud)
As datatypeVB中的规范是可选的.有关详细信息,请参阅每个文档
| 归档时间: |
|
| 查看次数: |
3448 次 |
| 最近记录: |