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

推荐订阅源

B
Blog
V
Vulnerabilities – Threatpost
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
月光博客
月光博客
T
Troy Hunt's Blog
博客园_首页
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
Blog — PlanetScale
Blog — PlanetScale
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Scott Helme
Scott Helme
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
Know Your Adversary
Know Your Adversary
SecWiki News
SecWiki News
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Threatpost
Forbes - Security
Forbes - Security
S
Schneier on Security
P
Proofpoint News Feed
T
Tor Project blog
Cyberwarzone
Cyberwarzone
The Hacker News
The Hacker News
Cloudbric
Cloudbric
S
Security @ Cisco Blogs
Webroot Blog
Webroot Blog
Attack and Defense Labs
Attack and Defense Labs
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
CERT Recently Published Vulnerability Notes
The Last Watchdog
The Last Watchdog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
S
SegmentFault 最新的问题
V
V2EX
量子位
B
Blog RSS Feed
宝玉的分享
宝玉的分享
T
The Blog of Author Tim Ferriss
罗磊的独立博客
J
Java Code Geeks

博客园 - Sumtec

This is it GOODBYE 博客园(附最后一个QUIZ部分不完整答案) 答案of QUIZ:一个网页上面有多少个SilverLight4应用时会发生莫名其妙的崩溃?和什么有关? QUIZ:一个网页上面有多少个SilverLight4应用时会发生莫名其妙的崩溃?和什么有关? 答案 of QUIZ:mscorlib当中最占文件空间的类是哪一个类? QUIZ:mscorlib当中最占文件空间的类是哪一个类? 大家来C#微群吧! 优秀程序员的修炼 做一个有独立脑袋,愿意思考的人 如何不成为傻瓜 世界主要是由傻瓜组成的 很简单的问题 解决问题不是光凭感觉和Google的 在创业团队图什么 支付宝的神奇体验 关注的都来一下,谢谢 拆迁条例据说也要有变化了 5年又5个月了 谁知道C# 5.0都会有些什么?
QUIZ:一个有8个属性的匿名类大约会占多大的文件大小?
Sumtec · 2011-08-18 · via 博客园 - Sumtec

在你们的开发当中,是否用过匿名类?也就是比如说:

var query = from item in database.Pages

 where item.PageId == 100 

                 select new {

                      item.Id,

                      item.Title,

                      item.CategoryId,

                      item.Tags,

                      item.ReplyCount,

                      item.ReadCount, 

                      item.RecommendCount, 

                      item.Abstract

                 }; 

其实就是一个再普通不过的匿名类,每个属性的名称也不是特别的长,你猜因为使用了这一个匿名类,会导致文件大小增长多少呢?增长的这部分大小主要是因为MetaData呢,还是MethodBody呢?如果是MetaData的话,那是因为类的各种属性名、方法名等造成的呢,还是一些用户常量数据造成的呢,还是别的什么?

还是和之前一样,等我高兴了我就把答案贴出来。(其实是有一个问题还没有搞清楚,哈哈,你们等着吧。)