我有一个包含数据表的变量,如果值为 0,我有条件,我想将其更改为“否”字符串。
这是我的原始代码
dt = BrowseServiceTypeMaster(ServiceTypeName)
lvServiceType.DataSource = dt
For i As Integer = 0 To dt.Rows.Count - 1
If dt(i)("exception").ToString = "0" Then
dt(i)("exception") = "No"
End If
Next
这就是我将其更改为:
For i As Integer = 0 To dt.Rows.Count - 1
If dt(i)("exception").ToString = "0" Then
dt(i)("exception").Fill = "No"
End If
Next
它仍然给我一个错误,有人可以帮助我吗?