P
pamelafluente
A curiosity.
When one can choose the Return (from a function) either StringBuilder
(that will be eventually converted to string) or a String, which one
would be better to return, in terms of efficiency and good practices.
Or it's just the same thing ?
Dim sb As New System.Text.StringBuilder
Function Whatever1() As String
....
Return sb.ToString
End Function
Function Whatever2() As System.Text.StringBuilder
....
Return sb
End Function
( I guess that for web services string is better (?) )
-P
When one can choose the Return (from a function) either StringBuilder
(that will be eventually converted to string) or a String, which one
would be better to return, in terms of efficiency and good practices.
Or it's just the same thing ?
Dim sb As New System.Text.StringBuilder
Function Whatever1() As String
....
Return sb.ToString
End Function
Function Whatever2() As System.Text.StringBuilder
....
Return sb
End Function
( I guess that for web services string is better (?) )
-P