a string MessageBox, MessageBox.Show. , overload, string, MessageBox. ,
string s =
MessageBox.Show(s);
, string. String.Format. Standard Numeric Format Strings MSDN. , "F" "F":
( "F" ) "-ddd.ddd...", "d" (0-9). "" .
.
,
double result = Math.Pow(2, 2.5);
string s = String.Format("2 to 2.5 power is {0:F4}", result);
, ,
double result = Math.Pow(2, 2.5);
string s = String.Format("2 to 2.5 power is {0:F4}", result);
MessageBox.Show(s);