Women in Technology

Hear us Roar

  StringBuilders Explained
Subject:   VB example
Date:   2003-07-22 16:46:19
From:   lwm
Response to: VB example

Oh yes...sorry about that. Please replace:
st += " World!" with st = st & " World!"
I kept thinking that "+=" was supported in VB6.
Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • VB example
    2004-01-05 09:32:06  anonymous2 [View]

    Dim x As String
    x = "Hello"
    x += " World"

    The use of += is valid in VB.NET, the above code will return "Hello World"
  • VB example
    2003-07-24 05:50:55  anonymous2 [View]

    asides, it's more advisable to use the "&" operator with strings instead of "+" because of the mathematical meaning attached to the latter.