Essential C# 8.0

E-book Engels 2022 9780135972236
Verwachte levertijd ongeveer 9 werkdagen

Samenvatting

The Comprehensive, Expert Guide to C# 8.0 for Programmers at All Levels
“Welcome to one of the most venerable and trusted franchises you could dream of in the world of C# books—and probably far beyond! . . . Mark is super smart, insists on understanding everything to the core, and has phenomenal insight into how things affect real developers. . . . He goes right to the essence and communicates with great integrity—no sugarcoating—and has a keen eye for practical value and real-world problems.”
— From the Foreword by Mads Torgersen, C# Lead Designer, Microsoft
Essential C# 8.0 is a well-organized, no-fluff guide to C# 8.0 for programmers at all levels of experience. This edition retains all the valuable content of prior editions and adds discussions of null reference types, indices and ranges, enhanced pattern matching, asynchronous stream, and more.

World-class C# expert Mark Michaelis presents a comprehensive tutorial and reference for the entire language, providing an accelerated learning opportunity to achieve expert C# programming skills. He includes key C# 8.0 enhancements, succinct examples to illustrate central constructs, and updated coding guidelines for minimizing bugs and writing code that's easier to evolve. To help you quickly fi nd what you need, there are version-specific indexes of C# 6.0, 7.0, and 8.0 topics and visual icons that identify when each language innovation was introduced.
Use structured programming constructs to write functioning code immediately Learn both the complexities and solutions to nullable reference types Thoroughly master C# object constructs, including classes, inheritance, and interfaces Reduce code redundancy with generics, delegates, lambda expressions, and events Take full advantage of collections, including the new standard query operator collection API Make the most of reflection, attributes, and the declarative programming paradigm Improve multithreading with the task-based async pattern and C# 8.0 asynchronous streams Enhance performance through the parallel processing of data and multithreading tasks Program complex types with enhanced pattern matching syntax Interoperate with unmanaged code written in other languages, including C-based APIs Explore the relationship between C# programs and the underlying CLI runtime Register your product for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.

Specificaties

ISBN13:9780135972236
Taal:Engels
Bindwijze:e-book

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

Figures xvii<br>Tables xix<br>Foreword xxi<br>Preface xxiii<br>Acknowledgments xxxv<br>About the Author xxxvii <br> <br> Chapter 1: Introducing C# 1<br>Hello, World 2 <br>C# Syntax Fundamentals 13 <br>Working with Variables 22 <br>Console Input and Output 26 <br>Managed Execution and the Common Language Infrastructure 34 <br>Multiple .NET Frameworks 39 <br> <br> Chapter 2: Data Types 45<br>Fundamental Numeric Types 46 <br>More Fundamental Types 55 <br>Conversions between Data Types 72 <br> <br> Chapter 3: More with Data Types 81<br>Categories of Types 81 <br>Declaring Types That Allow null 84 <br>Implicitly Typed Local Variables 89 <br>Tuples 92 <br>Arrays 98 <br> <br> Chapter 4: Operators and Flow Control 121<br>Operators 122 <br>Introducing Flow Control 138 <br>Code Blocks ({}) 144 <br>Code Blocks, Scopes, and Declaration Spaces 147 <br>Boolean Expressions 149 <br>Programming with null 155 <br>Bitwise Operators (&lt;&lt;, &gt;&gt;, |, &amp;, ^, ~) 162 <br>Control Flow Statements, Continued 168 <br>Jump Statements 180 <br>C# Preprocessor Directives 186 <br>Summary 193 <br> <br> Chapter 5: Methods and Parameters 195<br>Calling a Method 196 <br>Declaring a Method 203 <br>The using Directive 209 <br>Returns and Parameters on Main() 214 <br>Advanced Method Parameters 217 <br>Recursion 229 <br>Method Overloading 231 <br>Optional Parameters 234 <br>Basic Error Handling with Exceptions 239 <br>Summary 253 <br> <br> Chapter 6: Classes 255<br>Declaring and Instantiating a Class 259 <br>Instance Fields 262 <br>Instance Methods 265 <br>Using the this Keyword 266 <br>Access Modifiers 274 <br>Properties 276 <br>Constructors 293 <br>Non-Nullable Reference Type Properties with Constructors 303 <br>Nullable Attributes 306 <br>Deconstructors 309 <br>Static Members 311 <br>Extension Methods 321 <br>Encapsulating the Data 323 <br>Nested Classes 326 <br>Partial Classes 329 <br>Summary 333 <br> <br> Chapter 7: Inheritance 335<br>Derivation 336 <br>Overriding the Base Class 346 <br>Abstract Classes 357 <br>All Classes Derive from System.Object 363 <br>Pattern Matching with the is Operator 365 <br>Pattern Matching within a switch Expression 371 <br>Avoid Pattern Matching When Polymorphism Is Possible 373 <br>Summary 374 <br> <br> Chapter 8: Interfaces 377<br>Introducing Interfaces 378 <br>Polymorphism through Interfaces 380 <br>Interface Implementation 384 <br>Converting between the Implementing Class and Its Interfaces 390 <br>Interface Inheritance 390 <br>Multiple Interface Inheritance 393 <br>Extension Methods on Interfaces 394 <br>Versioning 396 <br>Extension Methods versus Default Interface Members 411 <br>Interfaces Compared with Abstract Classes 413 <br>Interfaces Compared with Attributes 415 <br> <br> Chapter 9: Value Types 417<br>Structs 422 <br>Boxing 428 <br>Enums 437 <br>Summary 447 <br> <br> Chapter 10: Well-Formed Types 451<br>Overriding object Members 451 <br>Operator Overloading 464 <br>Referencing Other Assemblies 472 <br>Encapsulation of Types 479 <br>Defining Namespaces 481 <br>XML Comments 485 <br>Garbage Collection 489 <br>Resource Cleanup 493 <br>Lazy Initialization 508 <br>Summary 510 <br> <br> Chapter 11: Exception Handling 511<br>Multiple Exception Types 511 <br>Catching Exceptions 514 <br>Rethrowing an Existing Exception 517 <br>General Catch Block 518 <br>Guidelines for Exception Handling 519 <br>Defining Custom Exceptions 523 <br>Rethrowing a Wrapped Exception 527 <br>Summary 530 <br> <br> Chapter 12: Generics 533<br>C# without Generics 534 <br>Introducing Generic Types 539 <br>Constraints 553 <br>Generic Methods 568 <br>Covariance and Contravariance 573 <br>Generic Internals 580 <br>Summary 585 <br> <br> Chapter 13: Delegates and Lambda Expressions 587<br>Introducing Delegates 588 <br>Declaring Delegate Types 592 <br>Lambda Expressions 600 <br>Statement Lambdas 601 <br>Anonymous Methods 606 <br>Delegates Do Not Have Structural Equality 608 <br>Outer Variables 611 <br>Expression Trees 616 <br>Summary 623 <br> <br> Chapter 14: Events 625<br>Coding the Publish–Subscribe Pattern with Multicast Delegates 626 <br>Understanding Events 641 <br>Summary 651 <br> <br> Chapter 15: Collection Interfaces with Standard Query Operators 653<br>Collection Initializers 654 <br>What Makes a Class a Collection: IEnumerable 657 <br>Standard Query Operators 663 <br>Anonymous Types with LINQ 695 <br>Summary 704 <br> <br> Chapter 16: LINQ with Query Expressions 705 <br>Introducing Query Expressions 706 <br>Query Expressions Are Just Method Invocations 724 <br>Summary 726 <br> <br> Chapter 17: Building Custom Collections 727 <br>More Collection Interfaces 728 <br>Primary Collection Classes 731 <br>Providing an Indexer 750 <br>Returning null or an Empty Collection 753 <br>Iterators 753 <br>Summary 768 <br> <br> Chapter 18: Reflection, Attributes, and Dynamic Programming 769 <br>Reflection 770 <br>nameof Operator 781 <br>Attributes 783 <br>Programming with Dynamic Objects 800 <br>Summary 811 <br> <br> Chapter 19: Introducing Multithreading 813 <br>Multithreading Basics 815 <br>Asynchronous Tasks 822 <br>Canceling a Task 843 <br>Working with System.Threading 850 <br>Summary 851 <br> <br> Chapter 20: Programming the Task-Based Asynchronous Pattern 853 <br>Synchronously Invoking a High-Latency Operation 854 <br>Asynchronously Invoking a High-Latency Operation Using the TPL 856 <br>The Task-Based Asynchronous Pattern with async and await 861 <br>Introducing Asynchronous Return of ValueTask&lt;T&gt; 867 <br>Asynchronous Streams 870 <br>IAsyncDisposable and the await using Declaration and Statement 874 <br>Using LINQ with IAsyncEnumerable 875 <br>Returning void from an Asynchronous Method 877 <br>Asynchronous Lambdas and Local Functions 881 <br>Task Schedulers and the Synchronization Context 887 <br>async/await with the Windows UI 890 <br>Summary 893 <br> <br> Chapter 21: Iterating in Parallel 895 <br>Executing Loop Iterations in Parallel 895 <br>Running LINQ Queries in Parallel 905 <br>Summary 911 <br> <br>Chapter 22: Thread Synchronization 913 <br>Why Synchronization? 914 <br>Timers 943 <br>Summary 945 <br> <br>Chapter 23: Platform Interoperability and Unsafe Code 947 <br>Platform Invoke 948 <br>Pointers and Addresses 960 <br>Executing Unsafe Code via a Delegate 971 <br>Summary 972 <br> <br>Chapter 24: The Common Language Infrastructure 973 <br>Defining the Common Language Infrastructure 974 <br>CLI Implementations 975 <br>.NET Standard 978 <br>Base Class Library 979 <br>C# Compilation to Machine Code 979 <br>Runtime 982 <br>Assemblies, Manifests, and Modules 986 <br>Common Intermediate Language 989 <br>Common Type System 990 <br>Common Language Specification 991 <br>Metadata 991 <br>.NET Native and Ahead of Time Compilation 993 <br>Summary 993 <br> <br> Index 995<br>Index of 8.0 Topics 1039<br>Index of 7.0 Topics 1041<br>Index of 6.0 Topics 1043

Managementboek Top 100

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        Essential C# 8.0