Replace string on VB.NET

Posted On // Leave a Comment

=== Program that replaces (VB.NET) ===

 

Module Module1

    Sub Main()

        ' Assign string to reference.

        Dim value1 As String = "Darth Vader is frightening."

        Console.WriteLine(value1)

 

        ' Replace word with another word.

        Dim value2 As String = value1.Replace("frightening", "silly")

        Console.WriteLine(value2)

    End Sub

End Module

 

=== Output of the program ===

 

Darth Vader is frightening.

Darth Vader is silly.

Sumber : http://dotnetperls.com/replace-vbnet

0 komentar: