I've been using stringbuilder for a long time and have never had this come up before. In this case I'm using a stringbuilder to put together a lengthy XML chunk, then at the end it gets put into a string to get submitted to a web service. At the ToString, all of the double quotes get turned into double-double quotes.
Dim tXML As New StringBuilder
Dim tt As String
tXML.Append("<?xml version=" & """" & "1.0" & """" & " encoding=" & """" & "UTF-8" & """" & "?>")
tt = tXML.ToString
'At this point the value of tXML is what I'd expect:
{<?xml version="1.0" encoding="UTF-8"?>}
'However the value of tt is
"<?xml version=""1.0"" encoding=""UTF-8""?>"
'this method of double-quotes produces the same result
tXML.Append("<?xml version=""1.0"" encoding=""UTF-8""?>")
This should be simple, but I'm at a loss. Thanks.