C# in Depth, 3rd Edition
C# intensive, 3rd Edition updates the best-selling moment variation to hide the hot gains of C# five, together with the demanding situations of writing maintainable asynchronous code. It preserves the uniquely insightful look at the tough parts and dusty corners of C# that merely professional Jon Skeet gives you.
About this Book
If you are a .NET developer, you are going to use C# even if you are development a sophisticated company software or simply slamming out a short app. In C# five, you are able to do extraordinary issues with generics, lambda expressions, dynamic typing, LINQ, iterator blocks, and different beneficial properties. yet first you should study it extensive.
C# extensive, 3rd Edition has been completely revised to hide the recent gains of C# five, together with the subtleties of writing maintainable asynchronous code. you will see the facility of C# in motion, studying the way to paintings with high-value gains that you will be completely happy to have on your toolkit. and you can discover ways to stay away from hidden pitfalls of C# programming with the aid of crystal transparent reasons of "behind the scenes" matters.
This booklet assumes you've got digested your first C# booklet and are hungry for extra!
Purchase of the print e-book contains a loose e-book in PDF, Kindle, and ePub codecs from Manning courses.
- Updated for C# 5
- The new async/await feature
- How C# works and why
About the Author
Jon Skeet is a Senior software program Engineer at Google, and a hugely obvious player of newsgroups, person teams, overseas meetings, and the Stack Overflow Q&A website. Jon spends a lot of his day coding in Java, yet his center belongs to C#.
Table of Contents
- The altering face of C# development
- Core foundations: construction on C# 1
- Parameterized typing with generics
- Saying not anything with nullable forms
- Fast-tracked delegates
- Implementing iterators the simple way
- Concluding C# 2: the ultimate features
- Cutting fluff with a wise compiler
- Lambda expressions and expression trees
- Extension equipment
- Query expressions and LINQ to Objects
- LINQ past collections
- Minor alterations to simplify code
- Dynamic binding in a static language
- Asynchrony with async/await
- C# five bonus positive factors and shutting strategies
PART 1 getting ready FOR THE JOURNEY
PART 2 C# 2: fixing the problems OF C# 1
PART three C# three: REVOLUTIONIZING info ACCESS
PART four C# four: taking part in properly WITH OTHERS
PART five C# five: ASYNCHRONY MADE basic
seem to be calling an OrderBy procedure at the checklist, but when you glance in MSDN, you’ll see that it doesn’t even exist in List
contrast among the 3. usually gains will overlap, yet it’s very important to appreciate the main of the problem. 22 1.6.1 bankruptcy 1 The altering face of C# improvement C#, the language The language of C# is outlined by way of its specification, which describes the structure of C# resource code, together with either syntax and behaviour. It doesn't describe the platform that the compiler output will run on, past a couple of key issues at which the 2 have interaction. for example, the C# language calls for a.
glided by price. If I have been to alter the worth of the builder variable in the method—for instance, with the assertion builder = null;—that swap wouldn’t be noticeable by means of the caller, opposite to the parable. It’s attention-grabbing to notice that not just is the “by reference” little bit of the parable erroneous, yet so is the “objects are handed” bit. items themselves are by no means handed, both by means of reference or through worth. while a reference sort is concerned, both the variable is glided by reference or the price of the.
458 Invariants 459 Assertions and assumptions 461 Legacy contracts 462 ■ ■ ■ 15.3 Rewriting binaries with ccrewrite and ccrefgen uncomplicated rewriting 464 agreement inheritance 466 agreement reference assemblies 469 Failure habit 464 ■ ■ 15.4 Static checking 472 Getting began with static checking 473 Implicit tasks 475 Selective checking 478 ■ ■ 15.5 15.6 Documenting contracts with ccdocgen functional contracts 482 480 Philosophy: what’s in a freelance? 483 How do i am getting started?.
It’s usually invaluable to consult the 153 shooting variables in nameless equipment first moment aim goal ref ref inside of within three 2 <>_outside outdoor <>_outside ref five ref <>_Generated1 <>_Generated2 <>_Generated1 determine 5.1 picture of a number of captured variable scopes in reminiscence specification to determine what’s guaranteed—but it’s additionally vital as a way to simply play with code to determine what occurs. It’s attainable that there are events the place code like directory 5.14 will be.