How to split the last part of a string in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
		Dim str As String = "c# c java c++ python vb.net"
		
		Dim lastpart As String = str.Substring(str.LastIndexOf(" ") + 1)
		
        Console.Write(lastpart)
    End Sub
End Class


	
	
	
' run:
'
' vb.net
'

 



answered Aug 18, 2023 by avibootz

Related questions

1 answer 216 views
1 answer 249 views
1 answer 214 views
1 answer 130 views
...