![]() | The Visual C++ Programming Tutorials: Playing With C++ Formatting, Format This and Format That
|
|
In C++ .NET the formatting totally different from the native C++. Here no more the %c, %d escape sequences as used in the printf(), scanf(), cin and cout instead you will find Console::WriteLine(). Can be regarded more complete functionalities by having the classes that support International or locale such as CultureInfo class. There are standard and custom numeric, date, time and string format giving you more control an appreciation. The .NET Framework provides a customizable, general-purpose formatting mechanism to convert a value into a string suitable for display. For example, a numeric value can be formatted in hexadecimal, scientific notation, or a series of digits separated into groups with a user-specified punctuation mark. Dates and times can be formatted as appropriate for a particular country, region, or culture. An enumerated constant can be formatted as its numeric value or its name. You control formatting by specifying a format string and format provider, or by using the defaults. A format string contains one or more format specifier characters that indicate how a value is to be converted. A format provider supplies additional control, replacement, and cultural information required to convert a specific type. You can override the way the .NET Framework interprets a format string by implementing the IFormattable interface, provide your own format provider by implementing the IFormatProvider interface, and perform your own formatting by implementing the ICustomFormatter interface. The .NET Framework provides a feature called composite formatting that uses one or more format strings to embed one or more formatted values in a result string. The result string can be used for further processing, displayed to the system console, or written to a stream. Browse and learn any topic that you interested below.
|
Best viewed using FireFox, Chrome etc. Worst viewed using IE of any version
Webmaster contact: [contact[@]visualcplusdotnet.com] Copyright 2019 © Visualcplusdotnet. All rights reserved. Excellent hosting services provided by MochaHost - The Online Central
| About | Disclaimer | Privacy | Site Index & Project Download | Native C | Contact | | |
Custom Search | |
|
|