How to convert the first character of a string to upper case and the rest to lower case in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
		Dim str As String = "converts a STRING IN VB.NET"
		
        str = str.Substring(0, 1).ToUpper() & str.Substring(1).ToLower()
		
        Console.WriteLine(str)
    End Sub
End Class




' run:
'
' Converts a string in vb.net
'

 



answered Jul 18, 2022 by avibootz
...