String.Format and Culture

When formatting a string, unlike DateTime, ever comes into play? Are there any examples of strings that will be formatted differently with two different cultures?

+3
source share
4 answers

I do not believe in the current Framework. But if Microsoft ever implements this offer on the Connect feedback site , it includes a proposal to have a format specifier to format upper case:

String.Format("{0:U}", "SomeString") => "SOMESTRING"

Such formatting will be culture specific.

+3
source

, , , ( CultureInfo.CurrentUICulture). , , ResourceManager.

+3

String.Format("{0}", "This string") - in my opinion, this is what you mean by your question does not affect the culture.

+1
source

There are many scenarios when you need culture-based formatting.

For example: - Number format

5.25 in English written as 5.25 in French

So, if you want to display the French format in your program, which is in the English culture, takes effect culture based string format.

0
source

All Articles