You are hereCustom Numeric Format Strings

Custom Numeric Format Strings



By stoneseq - Posted on 29 November 2013


int value = 123;
Console.WriteLine(value.ToString("\\#\\#\\# ##0 dollars and \\0\\0 cents \\#\\#\\#"));
Console.WriteLine(String.Format("{0:\\#\\#\\# ##0 dollars and \\0\\0 cents \\#\\#\\#}",
value));
// Displays ### 123 dollars and 00 cents ###


CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
17 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Subscribe to Getzy by e-mail

Delivered by FeedBurner

Syndicate

Syndicate content