本文介绍了从字符串“,"的转换键入“布尔"无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
能否请我帮忙,导致我在此代码中出现从字符串转换为",键入"Boolean"无效"的错误..
Hello guys,
Can you please help me please, cause i''m having an error on "Conversion from string "," to type ''Boolean'' is not valid" in this code..
Public Sub LoadUsers()
Dim LI As ListViewItem
Dim Users(), Napa() As String
Dim Data As String
Dim Path As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\encoders.dat"
Dim i As Integer
lvUsers.Items.Clear()
Data = LoadFile(Path)
If Data = "" Then Exit Sub
Users = Split(Data, ",")
For i = 0 To UBound(Users)
Napa = Split(Users(i), "=")
LI = lvUsers.Items.Add(Napa(0))
LI.SubItems.Add(Napa(1))
Next i
End Sub
并且在"Users = Split(Data,,")行中发生错误
请帮我吧...
在此先感谢....
And error occurs in the line of " Users = Split(Data, ",")"
Please hep me guys....
Thanks in advance....
推荐答案
Users = Split(Data, ","c)
或
or
Users = Split(Data, '','')
这篇关于从字符串“,"的转换键入“布尔"无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!