Dim mystring as string = " myintref="567" Mynewref="345" "
如何正確使用string.split
當轉義雙引號,我想,這樣我結束了分裂,在每個單引號的myString;
myintref= 567
Mynewref= 345
無論
Dim splitstring as string() = mystring.Split(""")
或
Dim splitstring as string() = mystring.Split(New Char {"""c})
出現工作。有什麼建議麼? (vs2015,vb.net v14)
我認爲VB用兩個連續的雙引號轉義字符串字面雙引號。如:「」這是一個「」引用「」字符串「' – David
感謝您的編輯,但不是我想要的(我無法得到正確格式的問題)myintref =應該是一個分裂,567下一個等 –
@大衛,如果你的意思是像mystring.split(「」「」「),那麼我已經嘗試過,它也不起作用 –