Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 12 sie 2016 · if you want the result as a string, just parse it and format it to one decimal places: string strTemp = 12; double temp = Double.Parse(strTemp, CultureInfo.InvariantCulture); string result = temp.ToString("N1", CultureInfo.InvariantCulture); Round off to 2 decimal places eg. 27.658 => 27.66.

  2. 25 kwi 2023 · The "D" (or decimal) format specifier converts a number to a string of decimal digits (0-9), prefixed by a minus sign if the number is negative. This format is supported only for integral types. The precision specifier indicates the minimum number of digits desired in the resulting string.

  3. You can use system.globalization to format a number in any required format. For example: system.globalization.cultureinfo ci = new system.globalization.cultureinfo("en-ca");

  4. 19 lis 2021 · Custom numeric format strings are supported by some overloads of the ToString method of all numeric types. For example, you can supply a numeric format string to the ToString (String) and ToString (String, IFormatProvider) methods of the Int32 type.

  5. 15 mar 2024 · You convert a string to a number by calling the Parse or TryParse method found on numeric types (int, long, double, and so on), or by using methods in the System.Convert class.

  6. I need convert a String to a decimal in C#, but this string have different formats. For example: "50085" "500,85" "500.85" This should be convert for 500,85 in decimal. Is there is a simplified form to do this convertion using format?

  7. 17 gru 2023 · One of the most commonly used format specifiers is the "N" specifier, which can be used to format numbers as decimal values with a specific number of decimal places. For example, if you want to display a number with two decimal places, you can use the "N2" specifier like this:

  1. Ludzie szukają również