程序1
If DataTables("订单").dataCols("金额").IsNumeric=True
messageBox.show("学编程得下苦工,尽量减少外界干扰!","警示")
End If
程序2
For Each dc As DataCol In DataTables("订单").DataCols
If dc.IsNumeric Then
Output.Show(dc.Name)
End If
Next
老师,程序中IsNumeric的结果是逻辑值,为什么在程序2中默认dc为数值型呢?程序2应该是下面的写法么
For Each dc As DataCol In DataTables("订单").DataCols
If dc.IsNumeric=True Then
Output.Show(dc.Name)
End If
Next