stringbuilder - .tostring not returning all data?

  • Thread starter Thread starter Mad Scientist Jr
  • Start date Start date
M

Mad Scientist Jr

I seem to have more data in my stringbuilder than .ToString is
returning.

Any idea why? Is there a limitation? Workaround?

Thanks

?Stringbuilder1.Length
145264
?Stringbuilder1.ToString.Length
153
?Stringbuilder1.MaxCapacity
2147483647
?Stringbuilder1.Capacity
274432
 
Mad said:
I seem to have more data in my stringbuilder than .ToString is
returning.

Any idea why? Is there a limitation? Workaround?

Thanks

?Stringbuilder1.Length
145264
?Stringbuilder1.ToString.Length
153
?Stringbuilder1.MaxCapacity
2147483647
?Stringbuilder1.Capacity
274432

What is contained in the StringBuilder? You don't have binary data
(like null characters) embeded in there do you? It might be helpful to
show the source of the data in the StringBuilder...
 
Not binary data per se, I *am* reading a binary file, byte by byte, and
if the byte is within the range of ASCII (32 - 127) it appeands the CHR
of it to the stringbuilder.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top