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

推荐订阅源

T
Threat Research - Cisco Blogs
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
Recorded Future
Recorded Future
The Register - Security
The Register - Security
Microsoft Azure Blog
Microsoft Azure Blog
Stack Overflow Blog
Stack Overflow Blog
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
Webroot Blog
Webroot Blog
Help Net Security
Help Net Security
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
Hacker News: Ask HN
Hacker News: Ask HN
Security Archives - TechRepublic
Security Archives - TechRepublic
Google Online Security Blog
Google Online Security Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tailwind CSS Blog
J
Java Code Geeks
C
CXSECURITY Database RSS Feed - CXSecurity.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyberwarzone
Cyberwarzone
小众软件
小众软件
G
Google Developers Blog
SecWiki News
SecWiki News
V
V2EX
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
S
Security Affairs
AI
AI
S
Securelist
D
Docker
人人都是产品经理
人人都是产品经理
T
Troy Hunt's Blog
罗磊的独立博客
The Hacker News
The Hacker News
阮一峰的网络日志
阮一峰的网络日志
Google DeepMind News
Google DeepMind News
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
P
Proofpoint News Feed
Vercel News
Vercel News
Jina AI
Jina AI

博客园 - 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的话,那是因为类的各种属性名、方法名等造成的呢,还是一些用户常量数据造成的呢,还是别的什么?

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