Use the String Copy method : String Copy « Data Type « VB.Net Tutorial






Option Strict On
 Imports System

 Class Tester
    Public Shared Sub Main( )
       Dim s1 As String = "abcd"
       Dim s2 As String = "ABCD"

       ' the String copy method
       Dim s5 As String = String.Copy(s2)
       Console.WriteLine("s5 copied from s2: {0}", s5)

    End Sub 'Main
 End Class 'Tester
s5 copied from s2: ABCD








2.32.String Copy
2.32.1.Use the String Copy method
2.32.2.Use the overloaded operator (=) to copy string