コード例 #1
0
 internal static string ToString(
     double value,
     FloatFormatHandling floatFormatHandling,
     char quoteChar,
     bool nullable)
 {
     return(JsonConvert.EnsureFloatFormat(value, JsonConvert.EnsureDecimalPlace(value, value.ToString("R", (IFormatProvider)CultureInfo.InvariantCulture)), floatFormatHandling, quoteChar, nullable));
 }
コード例 #2
0
 public static string ToString(decimal value)
 {
     return(JsonConvert.EnsureDecimalPlace(value.ToString(null, CultureInfo.InvariantCulture)));
 }
コード例 #3
0
 public static string ToString(double value)
 {
     return(JsonConvert.EnsureDecimalPlace(value, value.ToString("R", CultureInfo.InvariantCulture)));
 }
コード例 #4
0
 public static string ToString(float value)
 {
     return(JsonConvert.EnsureDecimalPlace((double)value, value.ToString("R", CultureInfo.get_InvariantCulture())));
 }
コード例 #5
0
 public static string ToString(Decimal value)
 {
     return(JsonConvert.EnsureDecimalPlace(value.ToString((string)null, (IFormatProvider)CultureInfo.InvariantCulture)));
 }
コード例 #6
0
 public static string ToString(float value)
 {
     return(JsonConvert.EnsureDecimalPlace((double)value, value.ToString("R", (IFormatProvider)CultureInfo.InvariantCulture)));
 }