迷之集合- dataTable
‘定义一个datatable,并声明一个空对象
Dim data As DataTable = New DataTable()
‘获取行数
Dim rows As Integer = data.Rows.Count
‘获取每行列名以及值
For Each row As DataRow In data.Rows
For Each col As DataColumn In data.Columns
‘获取列名
Print(col.ColumnName)
‘获取列值
Print(row.Item(col.ColumnName))
Next
Next
原文地址:https://www.cnblogs.com/bingshao/p/11994083.html
时间: 2024-10-14 21:14:57