【发布时间】:2012-10-26 20:24:34
【问题描述】:
我想从列表和数据库中删除一个项目。这是我使用的代码:
Dim nr As Integer
Dim s As String
s = lstPatiënten.ToString
nr = CInt(s.Split("-"c)(0))
For Each d In patienten
If d.nr = nr Then
If patientenDB.PatientVerwijderen(d) > 0 Then
initGetPatienten()
End If
End If
Next
但它不起作用..错误是:
从字符串“System.Windows.Forms.ListBox, It”转换为类型 “整数”无效。
但是当我输入 Nr = 83(83 是我的患者的用户 ID)时,它起作用了。
有人可以帮帮我吗?
【问题讨论】:
标签: vb.net string list split int