In the function below, what is the meaning of the & character? I'm not aware how it's valid syntax or how this would be used normally.
Normally using &= together would do a concatenation and assignment, resulting in "Hello world". However in this "typo" the code actually compiles but the result is just an assignment of " world" to the MyStr variable. Also if you define MyStr in the function rather than at the class level, the result is that it will not compile and interprets the & as a Type Character and fails because MyStr is a string and not of type Long.
Public Class MyClassName
Private MyStr As String
Public Sub New()
End Sub
Public Function MyFunction() As String
MyStr = "Hello"
MyStr& = " World"
Return MyStr
End Function
End Class