admin 管理员组文章数量: 887021
2023年12月18日发(作者:云建站模板)
nrNumber with commas for thousandsRound trippable{0:n}{0:r}1.421.42-12,Exceptioncf90xHexadecimal{0:x4}Exception
SpecifierdDtTfFgGMrsuUYTypeShort dateLong dateShort timeLong timeFull date & timeFull date & time (long)Default date & timeDefault date & time (long)Month day patternRFC1123 date stringSortable date stringUniversal sortable, local timeUniversal sortable, GMTYear month patternExample (Passed )10/12/2002December 10, 200210:11 PM10:11:29 PMDecember 10, 2002 10:11 PMDecember 10, 2002 10:11:29 PM10/12/2002 10:11 PM10/12/2002 10:11:29 PMDecember 10Tue, 10 Dec 2002 22:11:29 GMT2002-12-10T22:11:292002-12-10 22:13:50ZDecember 11, 2002 3:13:50 AMDecember, 2002
Specifierdddddddddf, ff, ...gg, ...hhHHmmTypeDayDay nameFull day nameSecond fractionsEra2 digit hour2 digit hour, 24hr formatMinute 00-59Example{0:dd}{0:ddd}{0:dddd}{0:fff}{0:gg}{0:hh}{0:HH}{0:mm}Example Output10TueTuesday932A.D.102238
(C) Currency: . . . . . . . . ($123.00)(D) Decimal:. . . . . . . . . -123(E) Scientific: . . . . . . . -1.234500E+002(F) Fixed point:. . . . . . . -123.45(G) General:. . . . . . . . . -123(N) Number: . . . . . . . . . -123.00(P) Percent:. . . . . . . . . -12,345.00 %(R) Round-trip: . . . . . . . -123.45(X) Hexadecimal:. . . . . . . FFFFFF85(d) Short date: . . . . . . . 6/26/2004(D) Long date:. . . . . . . . Saturday, June 26, 2004(t) Short time: . . . . . . . 8:11 PM(T) Long time:. . . . . . . . 8:11:04 PM(f) Full date/short time: . . Saturday, June 26, 2004 8:11 PM(F) Full date/long time:. . . Saturday, June 26, 2004 8:11:04 PM(g) General date/short time:. 6/26/2004 8:11 PM(G) General date/long time: . 6/26/2004 8:11:04 PM(M) Month:. . . . . . . . . . June 26(R) RFC1123:. . . . . . . . . Sat, 26 Jun 2004 20:11:04 GMT(s) Sortable: . . . . . . . . 2004-06-26T20:11:04(u) Universal sortable: . . . 2004-06-26 20:11:04Z (invariant)(U) Universal sortable: . . . Sunday, June 27, 2004 3:11:04 AM(Y) Year: . . . . . . . . . . June, 2004(G) General:. . . . . . . . . Green(F) Flags:. . . . . . . . . . Green (flags or integer)(D) Decimal number: . . . . . 3(X) Hexadecimal:. . . . . . . 00000003
版权声明:本文标题:Console.WriteLine()函数中{}输出格式详解(转载) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/free/1702896468h435075.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论