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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
Google Online Security Blog
Google Online Security Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
T
Threat Research - Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
Lohrmann on Cybersecurity
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
Schneier on Security
Schneier on Security
S
Schneier on Security
T
Tor Project blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
WordPress大学
WordPress大学
The Hacker News
The Hacker News
Hacker News - Newest:
Hacker News - Newest: "LLM"
罗磊的独立博客
Application and Cybersecurity Blog
Application and Cybersecurity Blog
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
C
Check Point Blog
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
雷峰网
雷峰网
S
Security @ Cisco Blogs
PCI Perspectives
PCI Perspectives
Spread Privacy
Spread Privacy
W
WeLiveSecurity
SecWiki News
SecWiki News
A
About on SuperTechFans
H
Help Net Security
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
爱范儿
爱范儿
S
Securelist
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
月光博客
月光博客
Jina AI
Jina AI
博客园 - 叶小钗
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
Recent Announcements
Recent Announcements
S
Secure Thoughts
The Cloudflare Blog
美团技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

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

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