Use the overloaded operator (=) to copy string : 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"

       
       Dim s6 As String = s1
       Console.WriteLine("s6 = s1: {0}", s6)

    End Sub 'Main
 End Class 'Tester
s6 = s1: abcd








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