FormatDecimal() private method

private FormatDecimal ( Decimal value, String format, NumberFormatInfo info ) : String
value Decimal
format String
info System.Globalization.NumberFormatInfo
return String
Example #1
0
 public static String Format(Currency value, String format, NumberFormatInfo info)
 {
     if (info == null)
     {
         info = NumberFormatInfo.CurrentInfo;
     }
     return(Number.FormatDecimal(ToDecimal(value), format, info));
 }
Example #2
0
 public String ToString(String format, IFormatProvider provider)
 {
     Contract.Ensures(Contract.Result <String>() != null);
     return(Number.FormatDecimal(this, format, provider));
 }
Example #3
0
 // Converts this Decimal to a string. The resulting string consists of an
 // optional minus sign ("-") followed to a sequence of digits ("0" - "9"),
 // optionally followed by a decimal point (".") and another sequence of
 // digits.
 //
 public override String ToString()
 {
     Contract.Ensures(Contract.Result <String>() != null);
     return(Number.FormatDecimal(this, null, null));
 }
Example #4
0
 public String ToString(IFormatProvider provider)
 {
     Contract.Ensures(Contract.Result <String>() != null);
     return(Number.FormatDecimal(this, null, NumberFormatInfo.GetInstance(provider)));
 }
Example #5
0
 public String ToString(String format)
 {
     Contract.Ensures(Contract.Result <String>() != null);
     return(Number.FormatDecimal(this, format, NumberFormatInfo.CurrentInfo));
 }
 public String ToString(String format, IFormatProvider provider)
 {
     return(Number.FormatDecimal(this, format, NumberFormatInfo.GetInstance(provider)));
 }
 public String ToString(String format)
 {
     return(Number.FormatDecimal(this, format, NumberFormatInfo.CurrentInfo));
 }
 // Converts this Decimal to a string. The resulting string consists of an
 // optional minus sign ("-") followed to a sequence of digits ("0" - "9"),
 // optionally followed by a decimal point (".") and another sequence of
 // digits.
 //
 public override String ToString()
 {
     return(Number.FormatDecimal(this, null, NumberFormatInfo.CurrentInfo));
 }
Example #9
0
 public string ToString(IFormatProvider provider)
 {
     return(Number.FormatDecimal(this, null, NumberFormatInfo.GetInstance(provider)));
 }
Example #10
0
 public String ToString(String format, IFormatProvider provider)
 {
     return(Number.FormatDecimal(this, format, provider));
 }
Example #11
0
 public String ToString(IFormatProvider provider)
 {
     return(Number.FormatDecimal(this, null, provider));
 }
Example #12
0
 public String ToString(String format)
 {
     return(Number.FormatDecimal(this, format, null));
 }
Example #13
0
 // Converts this Decimal to a string. The resulting string consists of an
 // optional minus sign ("-") followed to a sequence of digits ("0" - "9"),
 // optionally followed by a decimal point (".") and another sequence of
 // digits.
 //
 public override String ToString()
 {
     return(Number.FormatDecimal(this, null, null));
 }