Best practice or performance difference between ToString() and & concatenation

Posted by slolife on Stack Overflow See other posts from Stack Overflow or by slolife
Published on 2010-06-01T23:35:47Z Indexed on 2010/06/02 4:53 UTC
Read the original article Hit count: 236

When I am concatenating object values together to form a string in VB.NET, is there a difference in performance or a recommended best practice between using the & concat or the + concat with calls to .ToString() on each object?

Example (which is faster or best practice):

Dim result1 As String = 10 & "em"
Dim result2 As String = 10.ToString() + "em"

© Stack Overflow or respective owner

Related posts about .NET

Related posts about vb.net