How to split a string and get last value in VB.NET

1 Answer

0 votes
Imports System
Imports System.Linq

Public Class Program
	Public Shared Sub Main()
		Dim str As String = "c# c java c++ python vb.net"
		
        Dim last As String = str.Split(" "c).Last()
		
        Console.Write(last)
    End Sub
End Class


	
	
	
' run:
'
' vb.net
'

 



answered Aug 18, 2023 by avibootz
...