Effective C#
作 者: (美)比·瓦格納(Bill Wagner) 著
定 價: 89
出?版?社: 電子工業出版社
出版日期: 2018年07月01日
頁 數: 268
裝 幀: 平裝
ISBN: 9787121342653
●Chapter 1 C# Language Idioms 1
●Item 1: Prefer Implicitly Typed Local Variables 1
●Item 2: Prefer readonly to const 7
●Item 3: Prefer the is or as Operators to Casts 12
●Item 4: Replace string.Format() with Interpolated Strings 19
●Item 5: Prefer FormattableString for Culture-Specific Strings 23
●Item 6: Avoid String-ly Typed APIs 26
●Item 7: Express Callbacks with Delegates 28
●Item 8: Use the Null Conditional Operator for Event Invocations 31
●Item 9: Minimize Boxing and Unboxing 34
●Item 10: Use the new Modifier Only to React to Base Class Updates 38
●Chapter 2 .NET Resource Management 43
●Item 11: Understand .NET Resource Management 43
●Item 12: Prefer Member Initializers to Assignment Statements 48
●Item 13: Use Proper Initialization for Static Class Members 51
●Item 14: Minimize Duplicate Initialization Logic 53
●Item 15: Avoid Creating Unnecessary Objects 61
●Item 16: Never Call Virtual Functions in Constructors 65
●Item 17: Implement the Standard Dispose Pattern 68
●Chapter 3 Working with Generics 77......
內容簡介
本書的作者,也是.NET專家Bill Wanger給出我們50條利用C#優點以及特性來寫出健壯的,高效的,易於維護的代碼的高效法則。同時,本書也反映出了C#語言愈發不錯的特性以及關於它的開發社區。本書同時也給出了大量新穎的方法讓你能夠寫出高效可靠的代碼。近期新的第三版囊括了一些泛型和一些其他的語言集成查詢(LINQ),還包括了對異常不錯實踐這一新的章節。