Search code examples
c#asp.netresx

Need helped understanding .resx variables


I am working on a project for my company, and while tracing previously written code I came upon this:

<value>A payment authorization for {0:C} has been received.</value>

What does {0:C} mean? I have been trying to find out and am having no luck.


Solution

  • This is just a string like any other string. Once loaded into memory, it will be used as the format parameter to string.Format. {0:C} just means to format the number as currency using the current UI culture (or is it just current culture? I can never remember).