How to split in VB.NET

前端 未结 5 2191
别跟我提以往
别跟我提以往 2020-12-21 19:16

I am using VB.NET code.

I have got the below string.

http://localhost:3282/ISS/Training/SearchTrainerData.aspx

Now I want to split

5条回答
  •  猫巷女王i
    2020-12-21 19:24

    The Split function takes characters, which VB.NET represents by appending a 'c' to the end of a one-character string:

    Dim sentence = "http://localhost:3282/ISS/Training/SearchTrainerData.aspx"
    Dim words = sentence.Split("/"c)
    Dim lastWord = words(words.length - 1)
    

提交回复
热议问题