In both C # and VB.NET you can use either . ToString () or String.Format () Method for formatting text.
Using the .ToString () method, your example can be written as:
JSArrayString += "^" + (inv.RRP * oCountry.ExchangeRate).ToString("#0.00")
Alternatively, using String.Format (), it can be written as:
JSArrayString = String.Format("{0}^{1:#0.00}",JSArrayString,(inv.RRP * oCountry.ExchangeRate))
In both cases, I used custom formatting for a C # currency representing an optional place holder, and 0 representing 0 or a value if it exists.
, D2 2 C, . C, , .
. " String.Format(" {0} "," "};" " String Format for Int" String.Format .