I've got a decimal value, which is stored in my database (SQL Server 2008) with a precision of 13, and a scale of 10.
Examples:
10.6157894734
68.0750000000
96.8723684210
Basically, the numbers represent a "score" out of 100.
Now, i want to display/represent this value a different way, depending on the culture.
For example, in AU, i want to display the value out of 100, rounded up to 2 decimal places.
So in the above example:
10.62
68.08
96.87
But in US, i want to display the value out of 10, rounded up to 1 decimal place. So in the above example:
1.1
6.8
9.7
Can this be done with a resource-file, e.g doing something like:
return score.ToString(Resources.Global.ScoreFormat);
Where it could be stored as "#.##" in en-US, but "#.#" in en-AU?
I'm pretty sure it can't, since i'm not only rounding, but transforming using Math? (e.g value / 10 for AU) But thought i'd ask the question.
I'm trying to avoid an ugly if statement which checks the current culture and does math/rounding manually.