I've inherited code similar to the following with a comment on resetting the
string. Why would anyone want to do this? How could this reset the string?
What does it mean to reset a string?
Public Sub SetTheStringToS omething(ByRef OutStr As String)
OutStr = "123"
End Sub
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim s As String
SetTheStringToS omething(s)
Dim sOriginal$ = s
s = sOriginal 'reset the string ' <- why? how?
Debug.WriteLine (s)
Debug.WriteLine (sOriginal)
End Sub
--
Regards,
-Ron
string. Why would anyone want to do this? How could this reset the string?
What does it mean to reset a string?
Public Sub SetTheStringToS omething(ByRef OutStr As String)
OutStr = "123"
End Sub
Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim s As String
SetTheStringToS omething(s)
Dim sOriginal$ = s
s = sOriginal 'reset the string ' <- why? how?
Debug.WriteLine (s)
Debug.WriteLine (sOriginal)
End Sub
--
Regards,
-Ron
Comment