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

Does formatted string have length limitation?

P: n/a
I tried to do very simple operation, at least I thought it will be simple,
and it is to use String.Format. But, when formatted string bigger than 255 I
got this mistake "Input string was not in a correct format".

WHY IS IT SO?
Sep 21 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hello, Pavel!

PI tried to do very simple operation, at least I thought it will be
Psimple, and it is to use String.Format. But, when formatted string
Pbigger than 255 I got this mistake "Input string was not in a correct
Pformat".

PWHY IS IT SO?

I do not know it there is any strict limitation...

Do you have symbols '{' or '}' in the text that do not server as parameter placeholder?
If you have them then they have to be escaped with the same character.
That is '{' becomes '{{' and '}' becomes '}}'

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Sep 21 '06 #2

P: n/a
Pavel <pa***********@yahoo.cawrote:
I tried to do very simple operation, at least I thought it will be simple,
and it is to use String.Format. But, when formatted string bigger than 255 I
got this mistake "Input string was not in a correct format".

WHY IS IT SO?
Code example please.

--
Thomas T. Veldhouse
Key Fingerprint: 2DB9 813F F510 82C2 E1AE 34D0 D69D 1EDC D5EC AED1
Sep 21 '06 #3

P: n/a
Excuse me, but it was my mistake. This string was so long and mistake was
only for 1 letter, that I didn't put attention at till I started copy to
here. I wrote {9) instead of {9}.

"Vadym Stetsyak" wrote:
Hello, Pavel!

PI tried to do very simple operation, at least I thought it will be
Psimple, and it is to use String.Format. But, when formatted string
Pbigger than 255 I got this mistake "Input string was not in a correct
Pformat".

PWHY IS IT SO?

I do not know it there is any strict limitation...

Do you have symbols '{' or '}' in the text that do not server as parameter placeholder?
If you have them then they have to be escaped with the same character.
That is '{' becomes '{{' and '}' becomes '}}'

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot
Sep 21 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.