Let the number x = 0.9503435034. I translate a double in a string of string ^ like this:
str=Convert::ToString(x); т.е str="0.9503435034";
And how to do so, to write down a number with two decimal places? For example, the number x = 0.9503435034, and the string to go str = "0.95";
I know there is an overloaded function ToString () of class Convert, it looks like Convert::ToString(double value,IFormatProvider provider)
, but I don’t know what to give as the second parameter, please tell me what or other method.