How to get first three characters from a string in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
		Dim s As String = "vb.net-programming"
		
        Dim firstThree As String = s.Substring(0, 3)
		
        Console.WriteLine(firstThree)
    End Sub
End Class






' run:
'
' vb.
'

 



answered Nov 13, 2021 by avibootz

Related questions

...