简体   繁体   English

相当于Bloch的C#有效Java

[英]Equivalent of Bloch's Effective Java for C#

I've jumped into the C# bandwagon and was wondering if there's an equivalent of Joshua Bloch's Effective Java for the C# world. 我已经加入了C#的行列,并想知道是否有相当于Joshua Bloch的C#世界的Effective Java

I've already being able to apply some Java knowledge to C# given their similarity but I'm interested in knowledge to make the most effective use of C# specific features. 鉴于它们的相似性,我已经能够将一些Java知识应用于C#但我对知识感兴趣以最有效地利用C#特定功能。 For example, Generics are not implemented equally in Java and C#, so it's not clear to me if the Java Generic "techniques" will work in C# as well. 例如,Generics在Java和C#中没有同样的实现,所以我不清楚Java Generic“技术”是否也适用于C#。

I'm mostly interested in C# 3.0. 我最感兴趣的是C#3.0。 That is (of course) unless you guys think I would benefit for looking into versions 1 and 2 features. 这是(当然),除非你们认为我会因为研究版本1和2的功能而受益。

Jon Skeet 's C# In Depth is a favorite among StackOverflow users. Jon SkeetC#In Depth是StackOverflow用户的最爱。

C#深度
(source: askjonskeet.com ) (来源: askjonskeet.com

比尔瓦格纳有两本书有效C#更有效的C# ,与Effective Java类似。

Since you want something in the same line of Effective Java the following two books are very similar: 既然你想要在同一系列的Effective Java中使用以下两本书非常相似:

Effective C# 有效的C#

http://img253.imageshack.us/img253/8619/0321245660aa6.jpg http://img253.imageshack.us/img253/8619/0321245660aa6.jpg

More Effective C# 更有效的C#

http://images.amazon.com/images/P/0321485890.MZZZZZZZ.jpg http://images.amazon.com/images/P/0321485890.MZZZZZZZ.jpg

I found CLR Via C# , by Jeffery Richter, to be very good. 我发现Jeffery Richter的CLR Via C#非常好。 It discusses the CLR and framework in some depth and gives you a greater understanding of how to use various feature along with potential pitfalls. 它深入讨论了CLR和框架,让您更好地理解如何使用各种功能以及潜在的陷阱。

I think Framework Design Guidelines is the closest. 我认为框架设计指南是最接近的。 While I don't think it's comparable to Effective Java in terms of depth, I haven't read found any better book in the same category. 虽然我不认为它在深度方面与Effective Java相当,但我还没有在同一类别中找到更好的书。

C# in Depth is great, but it focuses more on the language than design issues in .NET. 深度中的C#很棒,但它更关注语言而不是.NET中的设计问题。 Therefore, I wouldn't put it in the same category with Effective Java. 因此,我不会将它与Effective Java放在同一类别中。

替代文字

有效的C#怎么样?

It's amazing to see how many people get to write books in the same vein as Scott Meyers' "Effective C++" and "More Effective C++". 令人惊讶的是,看到有多少人像Scott Meyers的“Effective C ++”和“More Effective C ++”一样编写书籍。 Here's an algorithm for becoming a published author: 这是一个成为已发布作者的算法:

  1. Learn new language X. 学习新语言X.
  2. Publish "Effective X" and "More Effective X". 发布“有效X”和“更有效X”。
  3. Bank tsunami of currency that rolls in. 卷入的货币银行海啸。

"Effective Haskell", anyone? “有效的Haskell”,有人吗?

I don't mean this to denigrate anyone who does this. 我并不是说这会诋毁任何这样做的人。 It's more of an homage to Scott Meyers - as good a computer scientist and writer as there is. 这更像是对斯科特迈耶斯的致敬 - 作为一名优秀的计算机科学家和作家。

Jon Skeet的C#In Depth也值得一提。

It is worth noting that a second edition of Bill Wagner's Effective C# was published recently (18th March 2010 in the UK). 值得注意的是,最近发布了第二版Bill Wagner的Effective C#(2010年3月18日在英国)。 This second edition updates it to cover C# 4.0. 第二版将其更新为涵盖C#4.0。

Personally, I was wholly unimpressed by the original edition of Effective C#, However, having bought this second edition a few days ago, it appears much better. 就个人而言,我对有效C#的原始版本完全不满意,但是,几天前买了第二版,看起来好多了。 It is not plagued by the same level of misprints, repetition and, most importantly, it correlates better with what I perceive as best practise rather than just detailing a lot of arbitrary personal choices. 它不会受到同样程度的错误印刷,重复的困扰,最重要的是,它与我认为的最佳实践更好地相关,而不仅仅是详细描述了许多任意的个人选择。

The fact that it is updated to cover C# 4.0 is also important! 它被更新以涵盖C#4.0的事实也很重要!

Having said all that, these are only my early observations as I haven't read much of it yet! 说了这么多,这些只是我早期的观察,因为我还没有读过很多内容!

Effective C# and More Effective C# by Bill Wagner. 比尔瓦格纳有效的C#更有效的C# The second book deals with C# 2 and 3. 第二本书涉及C#2和3。

Either here and here on Amazon.com 无论是 这里还是在亚马逊网站上

or here and here on Amazon.co.uk 或者在这里这里的Amazon.co.uk

There's a new version of Effective C# (Amazon UK) that covers C# 4.0. 有一个新版本的Effective C# (亚马逊英国)涵盖了C#4.0。

Beaten to it by Andy, but I was looking up the links. 安迪殴打它,但我正在查找链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM