C # digital format outputFavoritesInt A = 12345678;
// Output in the sring format
Label1.text = string. Format ("asdfadsf {0} adsfasdf", );
Label2.text = "asdfadsf" + A. tostring () + "adsfasdf ";
Label1.text = string. Format ("asdfadsf {0: c}
C # String.Format Daquan
?
?
?
Number in decimal
?
?
String. Format ("{0:d3}", 23)
023
Formatting decimal digits
String. Format ("{0:d2}", 1223)
1223
The
1. format the currency (related to the system environment. The Chinese system uses the default format of RMB and the English system uses the format of USD)
String. Format ("{0: c}", 0.2): ¥0.20 (English OS result: $0.20)
By default, two decimal
"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. 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
Transferred from: http://www.cnblogs.com/jobs2/p/3948049.htmlTransferred from: http://jingyan.baidu.com/article/48206aeaf8c52f216ad6b300.html1, formatted currency (related to system environment, Chinese system default format RMB, English system
1. format the currency (related to the system environment. The Chinese system uses the default format of RMB and the English system uses the format of USD)
String. Format ("{0: c}", 0.2): ¥0.20 (English OS result: $0.20)
By default, two decimal
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
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
Turn http://kwon.iteye.com/blog/1068255 http://blog.csdn.net/tvvbbb/article/details/47256943public static string decimaltostring (decimal D){Return d.tostring ("#0. ######");}This display is very simple to a few examples to understand, notice the
Article Source: http://www.cnblogs.com/7788/archive/2009/05/13/1455920.htmlLet's start with a few simple application examples:1. Formatted currency (related to system environment, Chinese system default format RMB, English system format USD)String.
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
Log Management-Log4net, log-log4net
Introduction
The log4net library is implemented by the Apache log4j framework on the Micorsoft. NET platform. It is a tool that helps programmers to output log information to various targets (such as the console,
IntroductionThe Log4net library is the implementation of the Apache LOG4J Framework on the Micorsoft.net platform, a tool that helps group programmers to output log information to various targets (consoles, files, databases, etc.). (Baidu
C # format the value result tableCharacterDescriptionExampleOutput C currency string. format ("{0: c3}", 2) $2.000D decimal string. format ("{0: d3}", 2) 002E scientific notation 1.20e + 001 1.20e + 001G regular string. format ("{0: g}", 2) 2N
If we all calculate the right format, and then show then, obviously wasteful code and efficiency, today saw a lot of ToString can solve the format, summed up for everyone, hope that can be convenient for everyone.
1. Convert money format, only int,
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.