Agent707
Newcomer
I have a couple of developers having a "discussion" about which is the more efficient way of doing string concatination... :-\
And when I say efficient, I mean "faster execution" wise.
Now imaging this type of coding with a thousand lines instead of 3.
I have always used method #2. This one guy has always used #1, though he says he "thinks" #2 is more efficient. The other guy is just a trouble maker and says everyone is wrong and he is right, but he has no opinion.
Does anyone have any "technical" explanation of which method is the preferred? IF there is any?
And when I say efficient, I mean "faster execution" wise.
Visual Basic:
'#1
sVar = "This is some text "
sVar += "and this is some more text "
sVar += "...etc..." & someVar & " some more text"
'....etc. on for a thousand lines...
'#2
sVar = "This is some text " & _
"and this is some more text " & _
"...etc..." & someVar & " some more text"
'And every so many rows, 40 or 50?, add to it like so...
sVar += "and another 40 or 50 so lines of text." & _
I have always used method #2. This one guy has always used #1, though he says he "thinks" #2 is more efficient. The other guy is just a trouble maker and says everyone is wrong and he is right, but he has no opinion.
Does anyone have any "technical" explanation of which method is the preferred? IF there is any?