By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,168 Members | 2,511 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,168 IT Pros & Developers. It's quick & easy.

stringbuilder - .tostring not returning all data?

P: n/a
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

Mar 23 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Mad Scientist Jr wrote:
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...

--
Tom Shelton [MVP]

Mar 23 '06 #2

P: n/a
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.

Tom Shelton wrote:
Mad Scientist Jr wrote:
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...

--
Tom Shelton [MVP]


Mar 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.