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

推荐订阅源

Martin Fowler
Martin Fowler
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
雷峰网
雷峰网
J
Java Code Geeks
G
Google Developers Blog
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
L
LangChain Blog
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
Vercel News
Vercel News
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
Y
Y Combinator Blog
博客园_首页
Last Week in AI
Last Week in AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
A
About on SuperTechFans
B
Blog
Microsoft Security Blog
Microsoft Security Blog

博客园 - 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/