惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
博客园_首页
M
MIT News - Artificial intelligence
雷峰网
雷峰网
GbyAI
GbyAI
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
S
SegmentFault 最新的问题
H
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 【当耐特】
V
Visual Studio Blog
月光博客
月光博客
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
腾讯CDC
云风的 BLOG
云风的 BLOG
美团技术团队
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队

博客园 - Zhongjian Zhang

.net framework profiles /.net framework 配置 人生的意义岂止是谋生-新视野大学英语第二册第八单元A课文 - Zhongjian Zhang - 博客园 类接口/Class Interface LG 3D投影 directory searchPattern to regex pattern Textbox/ComboBox 自动完成AutoCompletion Bloom's Taxonomy/布鲁姆分类 Data Structure/数据结构 in .Net Custom Shapes/Combin Shapes/合并图形 in PowerPoint 2010 scale up vs scale out/Scale vertically vs. horizontally Window Types(Tool windows/document windows)/窗口类型(工具窗口/文档窗口) in VS VS2010中shortcut key快捷键一览下载 随机long(Random long/NextLong) Windows Azure Storage Explorer List System Error Codes/系统错误代码 图解500强 超级计算机 In graphics: Supercomputing superpowers FTP active mode and assive mode(ftp 主动模式/被动模式) Ftp commands and options 为VM制作可引导的操作系统ISO
格式化类型和分析字符串
Zhongjian Zhang · 2010-11-30 · via 博客园 - Zhongjian Zhang

格式化类型和分析字符串

格式设置将类型的值转换为字符串表示形式。最常见是用ToString()来设置默认格式

http://msdn.microsoft.com/zh-cn/library/b4w53z0y.aspx

包含以下几节:

 分析是格式设置的反向操作。分析操作根据数据类型的字符串表示形式创建该数据类型的实例。  常见的是Parse()
 http://msdn.microsoft.com/zh-cn/library/b4w53z0y.aspx

本节内容

分析数值字符串

描述如何将字符串转换为 .NET Framework 的 numeric 类型。

分析日期和时间字符串

描述如何将字符串转换为 .NET Framework 的 DateTime 类型。

分析其他字符串

描述如何将字符串转换为 CharBooleanEnum 类型。

另外,在CLR via C#一书中Chars, Strings, and Working with Text章中对格式化和分析也有详细说明。

Reference:

http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx

http://msdn.microsoft.com/en-us/library/0c899ak8.aspx

http://www.csharp-examples.net/string-format-double/