“Testing.BSMain,Text:Start Page”
我想将上面的值子字符串并仅返回vb.net中“:”之后的值.我怎样才能做到这一点?
假设没有错误检查:
Dim phrase As String = "Testing.BSMain,Text: Start Page".Split(":")(1)
它简单地用冒号分割短语并返回第二部分.
要使用SubString,请尝试以下操作:
Dim test As String = "Testing.BSMain,Text: Start Page" Dim phrase As String = test.Substring(test.IndexOf(":"c) + 1)