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

推荐订阅源

P
Proofpoint News Feed
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
B
Blog RSS Feed
H
Help Net Security
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
L
LangChain Blog
IT之家
IT之家
F
Fortinet All Blogs
V
V2EX
C
Check Point Blog
The Cloudflare Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans

博客园 - 如斯夫

Windows Azure中的Affinity Group .NET内存管理 .NET程序的运行与内存管理 堆栈和堆 应用程序的装载与运行 字符串匹配算法 – Sunday算法 该怎么教育 COM学习 完成了吗? 技术人员面试流程泳道图 创建型模式 C# 面试题目 单链表中删除重复数据 C# 数据结构 单链表反转 C# 面试算法 人的问题 C# 点滴 - 枚举 数据库惊魂 没有人能随随便便成功 If you are a new test manager – From google testing blog
foreach中的隐式类型转换
如斯夫 · 2010-02-22 · via 博客园 - 如斯夫
            List<object> list = new List<object> { "This is a string" };

            foreach (string entry in list)
            {
                Console.WriteLine(entry);
            }

在上面的foreach循环中实际上会发生隐式的类型转换,将list中的每一项从object强制转换为string,如果list中添加了非string类型的对象,在运行时就会抛出转换异常。