Bright Leopold

i come from the other world,i will go back after the love,the regret,the alive and the dead are over

导航

2011年5月12日

String.Format,DateTime日期时间格式化集锦,备忘录

摘要: //String.Format,DateTime日期时间格式化集锦,备忘录 DateTime dt = DateTime.Now;//2010年10月4日 17点05分 string str = ""; //str = string.Format("{0:y yy yyy yyyy}", dt); //10 10 2010 2010 //str = String.Format("{0:M MM MMM MMMM}", dt); //10 10 十月 十月 //str = String.Format("{0:d dd ddd 阅读全文

posted @ 2011-05-12 20:09 Bright Leopold 阅读(2573) 评论(0) 推荐(0)

String.Format用法

摘要: 名称 说明 Format(String, Object) 将指定的 String 中的格式项替换为指定的 Object 实例的值的文本等效项。 Format(String, array<>[]()[]) 将指定 String 中的格式项替换为指定数组中相应 Object 实例的值的文本等效项。 Format(IFormatProvider, String, array<>[]()[]) 将指定 String 中的格式项替换为指定数组中相应 Object 实例的值的文本等效项。指定的参数提供区域性特定的格式设置信息。 Format(String, Object, Obje 阅读全文

posted @ 2011-05-12 20:03 Bright Leopold 阅读(15918) 评论(0) 推荐(0)

Repeater在绑定显示的各种格式

摘要: Repeater在绑定显示的各种格式--Repeater列 数字、货币和日期 显示格式 形式 语法 结果 注释 数字 {0:N2} 12.36 数字 {0:N0} 13 货币 {0:c2} $12.36 货币 {0:c4} $12.3656 货币 "¥{0:N2}" ¥12.36 科学计数法 {0:E3} 1.23E+001 百分数 {0:P} 12.25% P and p present the same. 日期 {0:D} 2006年11月25日 日期 {0:d} 2006-11-25 日期 {0:f} 2006年11月25日 10:30 日期 {0:F} 2006年1 阅读全文

posted @ 2011-05-12 19:31 Bright Leopold 阅读(748) 评论(0) 推荐(1)