How to extract first middle last and name from a full name in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
        Dim name As String = "James John William"
		
        Dim arr = name.Split(" "c)

        Console.WriteLine(arr(0))
        Console.WriteLine(arr(1))
        Console.WriteLine(arr(2))
    End Sub
End Class




' run:
'
' James
' John
' William
'

 



answered Nov 24, 2021 by avibootz

Related questions

1 answer 195 views
1 answer 258 views
1 answer 191 views
1 answer 186 views
1 answer 227 views
...