Dim st As String
st = 'Hello'
st += ' World!'
However, this seemingly innocent piece of code is not the recommended way to perform string manipulations in .NET. This is because strings in NET are immutable, which means that once a string variable is assigned a value, it cannot be changed. If the value of a string variable is changed, another string object is created during runtime. In the above code sample, two string objects are involved; one for the initialization and one for the concatenation."
O'Reilly Network - StringBuilders Explained
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου