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

1 answer 255 views
1 answer 244 views
2 answers 351 views
1 answer 244 views
1 answer 316 views
...