Text formatting tools allow you to format values using many parameters and options. However, this tool has its weaknesses. Formatting is applied to the entire text object. For example, if a text component is used to output data, formatting it is easy. But what if you only need to format one value from the expression? Or what if you need to format the value of more than one expression? In such cases, it is recommended to use the string.Format method. Use this method to do much the same kind of formatting you would do using a text formatting tool. However, the string.Format method is more flexible. For example, to format the value as currency, use the C specifier.

Currency value: {string.Format(“{0:C}”, Value) }

If the value is 123.12, the formatted line looks like this:

Currency value: $123.12

The string.Format method may have multiple parameters for the format, for example.

Currency values: {string.Format(“value1 – {0:C}, value2 – {0: 1}”, Value1, Value2) }

See MSDN for more information on string.Format.