>>See
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx and
http://msdn.microsoft.com/en-us/library/0c899ak8.aspx.
>>
>>I would probably just use "C" as the format. If you need a custom format, I would try "$#,##0.00".
>
>Yes. That "c" will use your regional currency format.
>
>Michel's answer will work if you have to support multiple currency formats for multiple cultures.
Do you see what is wrong here
displayString.AppendFormat("{0C} {1} {2}{3} {4D16}{5D16} {6} {7}{3}{3}",
Convert.ToDecimal(row["extension"]), Convert.ToDateTime(row["date_time"]), message, Environment.NewLine,
Convert.ToDecimal(row["sale_no"]), Convert.ToDecimal(row["trans_no"]),
row["operator"].ToString(), row["salespoint"].ToString());
I am getting Format Specifier was invalid.
System.FormatException was caught
HResult=-2146233033
Message=Input string was not in a correct format.
Source=mscorlib
StackTrace:
at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
at System.Text.StringBuilder.AppendFormat(String format, Object[] args)
If it's not broken, fix it until it is.
My Blog