http://msdn.microsoft.com/library/dotnet/cpguide/cpconpicturenumericformatstrings.htm (direct connection URL)
If the built-in formatting strings does not provide the type of formatting your require, you can use the picture format Strings T o Create
Replace each format item in the specified string with the text equivalent item of the value of the corresponding object.
String Str1 = string. Format ("{0: N1}", 56789 ); // Result: 56,789.0 String Str2 = string. Format ("{0: N2}", 56789 ); //
In-depth parsing of JavaScript numeric and string objects, javascript strings
JavaScript Number objectJavaScript has only one numeric type.You can use or do not use the decimal point to write numbers.JavaScript numbersJavaScript numbers can be
Learning content: C #; Learning books: Illustrated Tutorials (Chinese fourth edition).Table of Contents: Chapter II Programming Overview of C #-----> 2.7 outputting text from programs-----> 2.7.5 Formatting numeric
"Turn" http://blog.csdn.net/samsone/article/details/75567811. Formatted currency (related to system environment, Chinese system default format RMB, English system format USD)String. Format ("{0:c}", 0.2) results are: ¥0.20 (English operating system
1 Preface
If you are familiar with the WTL or CString standard of the Cstring,windows Template Library (Template) of Microsoft Foundation Classes (MFC) Library (STL) String class, then you must be familiar with the String.Format method. This method
1. Formatted currency (related to system environment, Chinese system default format RMB, English system format USD)String. Format ("{0:c}", 0.2) results are: ¥0.20 (English operating system results: $0.20)The default formatting retains two decimal
Character and string processing functions: Character and string processing functions are all character data, but their return value types are different.1. Take the SUBSTRING function:Format: substr (C,N1,N2)Function: Take the string C N1 character
C # formatting the numeric result table (formatting strings)
Character
Description
Example
Output
C
Currency
String. Format("{0: C3}", 2)
$2.000
D
Decimal
String. Format("{0: D3}", 2)
002
This article will introduce some interesting functions that trisi often uses in daily life, or which are rarely used. There are two types of introduction:
Famous functions-frequently used functions
Non-famous functions-although rarely used, they are
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.