TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Longest and Shortest Type Name in .NET 4.0 using LINQ

16 点作者 bunglebooz将近 15 年前

2 条评论

euroclydon将近 15 年前
It would be pretty cool to try to instantiate each one, and then do a sizeof(instance) on it to see how large the memory footprint is.
评论 #1603773 未加载
DanielBMarkham将近 15 年前
I love F#.<p>Same code in F# (one line, of course!)<p><pre><code> let currentNetTypes = System.AppDomain.CurrentDomain.GetAssemblies() |&#62; Seq.filter(fun x-&#62;x.FullName.Contains("Version=4.0.0.0")) |&#62; Seq.map(fun x-&#62;x.GetExportedTypes()) |&#62; Seq.concat |&#62; Seq.sortBy(fun x-&#62;x.Name.Length);; </code></pre> To me this reads easier, but I admit to a biased opinion :)
评论 #1604642 未加载
评论 #1603612 未加载
评论 #1603766 未加载