03.01.2015 Views

C# 5.0 Programmer's Reference

Visual Studio 2013 C# 5.0 Programmer's Reference

Visual Studio 2013 C# 5.0 Programmer's Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

812 ❘ Appendix Q Other Format Specifiers<br />

The D or d specifier always formats the variable as a number.<br />

The specifier X or x formats the value as a hexadecimal number.<br />

The following table summarizes the enumeration format specifiers.<br />

Specifier<br />

G or g<br />

F or f<br />

D or d<br />

X or x<br />

Meaning<br />

(The default.) Returns the string value if possible.<br />

If the value includes multiple enumeration values and the enumeration is<br />

marked with the Flags attribute, this returns the values separated by commas.<br />

If the value is not defined by the enumeration, or if it includes multiple enumeration<br />

values but the enumeration does not have the Flags attribute, this<br />

returns a numeric value.<br />

Returns the string value if possible.<br />

If the value includes multiple enumeration values, this returns the values separated<br />

by commas.<br />

If the value is not defined by the enumeration, this returns a numeric value.<br />

Always returns a numeric result.<br />

Always returns a hexadecimal numeric result.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!