- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
writeline(听听听听听听听听听听听听听)
writeline(听听听听听听听听听听听听听)
The format entries are in the following form:
{index[, alignment][: formatString]}
Where index refers to index placeholders, which must be known;
Alignment is literally aligned and marked with ;
FormatString is the restriction to the output format, with : as the mark.
Alignment: optional is a signed integer indicating the preferred width of the formatted field. If the alignment value is less than the length of the formatted string, the alignment is ignored and the length of the formatted string is used as the field width. If the alignment is positive, the formatted data of the field is aligned right; if the alignment is negative, the formatted data of the field is left justified. If you need to fill, use the blank. If you specify align, you need to use commas.
FormatString: is a standard or custom format specifier.
The following form is available from the internet:
character
Explain
Sample
output
C
currency
String.Format ({0:C3}, 2)
$2
D
Decimal system
String.Format ({0:D3}, 2)
002
E
Scientific notation
1.20E+001
1.20E+001
G
routine
String.Format ({0:G}, 2)
Two
N
Numbers separated by semicolons
String.Format ({0:N}, 250000)
Two hundred and fifty thousand
X
Hexadecimal
String.Format ({0:X000}, 12)
C
String.Format ({0:000.000}, 12.2)
Twelve point two zero zero
Specifier
Type
Format
Output
(Passed
Double 1.42)
Output
(Passed
Int -12400)
C
Currency
{0:c}
$1.42
- $12400
D
Decimal (Whole, number)
{0:d}
System.
FormatException
-12400
E
Scientific
{0:e}
1.420000e+000
-1.240000e+004
F
Fixed point
{0:f}
One point four two
-12400.00
G
General
{0:g}
One point four two
-12400
N
Number, with, commas, for, thousands
{0:n}
One point four two
-12400
R
Round trippable
{0:r}
One point four two
System.
FormatException
X
Hexadecimal
{0:x4}
System.
FormatException
Cf90
Specifier
Type
Example (Passed, System.DateTime.Now)
D
Short date
10/12/2002
D
Long date
December 10, 2002
T
Short time
10:11, PM
T
Long time
10:11:29 PM
F
Full date time
December 10, 2002, 10:1
您可能关注的文档
- 03.3.牛顿第二定律(03.3. Newton's second law).doc
- ++兰州大学风雨百年发展历程_卫视_凤凰网2().doc
- 007_黄仁宇现象(007_ Huang Renyu phenomenon).doc
- 002机械挖土施工工艺(002 mechanical excavation construction technology).doc
- 007如何创建html表格(007 how to create a HTML table).doc
- 008_盼(008_ look forward to).doc
- 0.5元(0.5 yuan).doc
- 033牛顿第二定律(033 Newton's second law).doc
- 002汽车美容店投资创业方案(002 auto beauty shop investment venture program).doc
- 04 配套cad笔记(04 matching CAD notes).doc
- xp通用快捷键(XP universal shortcut key).doc
- xs128一般模块配置(Xs128 general module configuration).doc
- xp系统变快(The XP system is fast).doc
- xinwen(行业新闻).doc
- xx县在全市人口与资源环境工作会上的发言(Speech by XX County in the city's population, resources and Environment Conference).doc
- xx市2006年上半年畜牧和粮油生产等主要统计数据质量…(XX City in the first half of 2006, livestock and grain and oil production and other major statistical data quality...).doc
- xx市2006年干部教育培训工作要点(Main points of cadre education and training in XX City in 2006).doc
- xx镇2006年上半年工作完成情况汇报材料(XX town in the first half of 2006 completion of the work report material).doc
- youth-青春 -美文故事-散文随笔- 文章阅读网(Youth- youth - Essay - prose essay - Reading Network).doc
- z1r-z1rb 第四版4th 软硬件升级说明-20120307(Z1r-z1rb fourth edition 4th hardware and software upgrade description -20120307).doc
文档评论(0)