How to use multiple replacements on a string in one line with VB.NET

1 Answer

0 votes
Imports System
				
Public Module Module1
	Public Sub Main()
		Dim s AS String = "bbb"
      	
		s = s.Replace("b", "x").Replace("x", "y").Replace("y", "z")
   
        Console.WriteLine(s)
	End Sub
	
End Module


' run:

' zzz

 



answered Jun 18, 2019 by avibootz

Related questions

...