示例#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));
 }
 public static string ToString(decimal value)
 {
     return(JsonConvert.EnsureDecimalPlace(value.ToString(null, CultureInfo.InvariantCulture)));
 }
 public static string ToString(double value)
 {
     return(JsonConvert.EnsureDecimalPlace(value, value.ToString("R", CultureInfo.InvariantCulture)));
 }
 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)));
 }