How to remove all spaces from a string in VB.NET

1 Answer

0 votes
Imports System

Public Class Program
	Public Shared Sub Main()
		Dim str As String = "Remove all spaces from string in VB.NET"
		
        str = str.Replace(" ", String.Empty)
		
        Console.Write(str)
    End Sub
End Class




' run:
'
' RemoveallspacesfromstringinVB.NET
'

 



answered Nov 10, 2022 by avibootz
...