You are hereStandard Numeric Format Strings

Standard Numeric Format Strings



By stoneseq - Posted on 29 November 2013


int value;

value = 0x2045e;
Console.WriteLine(value.ToString("x"));
// Displays 2045e
Console.WriteLine(value.ToString("X"));
// Displays 2045E
Console.WriteLine(value.ToString("X8"));
// Displays 0002045E 

value = 123456789;
Console.WriteLine(value.ToString("X"));
// Displays 75BCD15
Console.WriteLine(value.ToString("X2"));
// Displays 75BCD15


CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 0 =
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