The Temple of Fu

code, systems and games

.NET String Format Cheatsheet

leave a comment »

C or c : Used to format currency. By default prefixes the local cultural symbol
D or d : Used to format decimal numbers. Flag can also specify minimum number of digits to pad the decimal value
E or e : Used for exponential notation.
F or f : Used for fixed point formatting.
G or g : Stands for general. This flag can be used to format a number to fixed or exponential formatting.
N or n : Used for basic numerical formatting (with commas)
X or x : Hexadecimal formatting. If uppercase X your hex output will also contain uppercase hex digits.

Advertisements

Written by lordfu

February 4, 2010 at 3:57 am

Posted in ASP.Net, Development

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: