I had a very similar experience when I added strings, but forgot to add String.Format. In this way:
myStringBuilder.Append("1,""{0}""", someVeryLargeIntVariable)
should have been:
myStringBuilder.Append(String.Format("1,""{0}""", someVeryLargeIntVariable))
Please note that this is my vb.net code that failed. I repeated a similar test in C # with:
myStringBuilder.Append('a', 1564544656);
against.
myStringBuilder.Append(string.Format("1,\"{0}\"", 1564544656));
But in my case, vb.net caused me b / c implicit conversion problems (I could not parallel with the same problem in C #).
I hope this helps someone.
archangel76 Dec 22 '11 at 9:32 a.m. 2011-12-22 21:32
source share