Professional C# and .NET
Get the latest coverage of the newest features in C#9 and.NET 5 In Professional C# and.NET: 2021 Edition, Microsoft MVP for Visual Studio and Development Technologies and veteran developer, Christian Nagel, delivers a comprehensive tour of the new features and capabilities of C#9 and.NET 5. Experien...
Uložené v:
| Hlavný autor: | |
|---|---|
| Médium: | E-kniha |
| Jazyk: | English |
| Vydavateľské údaje: |
Newark
Wiley
2021
John Wiley & Sons, Incorporated Wrox |
| Vydanie: | 8 |
| Predmet: | |
| ISBN: | 1119797225, 9781119797227, 9781119797203, 1119797209 |
| On-line prístup: | Získať plný text |
| Tagy: |
Pridať tag
Žiadne tagy, Buďte prvý, kto otaguje tento záznam!
|
Obsah:
- Configure Await
- Chapter 9 Language Integrated Query -- LINQ Overview -- Lists and Entities -- LINQ Query -- Extension Methods -- Deferred Query Execution -- Standard Query Operators -- Filter -- Filter with Index -- Type Filtering -- Compound from -- Sorting -- Grouping -- Variables Within the LINQ Query -- Grouping with Nested Objects -- Inner Join -- Left Outer Join -- Group Join -- Set Operations -- Zip -- Partitioning -- Aggregate Operators -- Conversion Operators -- Generation Operators -- Parallel LINQ -- Parallel Queries -- Cancellation -- Expression Trees -- LINQ Providers -- Summary -- Chapter 10 Errors and Exceptions -- Handling Errors -- Predefined Exception Classes -- Catching Exceptions -- Exceptions and Performance -- Implementing Multiple Catch Blocks -- Catching Exceptions from Other Code -- System.Exception Properties -- Exception Filters -- Rethrowing Exceptions -- Naïvely Rethrowing the Exception -- Changing the Exception -- Rethrowing the Exception -- Using Filters to Add Functionality -- What Happens If an Exception Isn't Handled? -- User-Defined Exception Classes -- Catching the User-Defined Exceptions -- Throwing the User-Defined Exceptions -- Defining the User-Defined Exception Classes -- Caller Information -- Summary -- Chapter 11 Tasks and Asynchronous Programming -- Why Asynchronous Programming Is Important -- Task-Based Async Pattern -- Tasks -- Creating Tasks -- Calling an Asynchronous Method -- Using the Awaiter -- Continuation with Tasks -- Synchronization Context -- Using Multiple Asynchronous Methods -- Calling Asynchronous Methods Sequentially -- Using ValueTasks -- Using Combinators -- Error Handling -- Handling Exceptions with Asynchronous Methods -- Handling Exceptions with Multiple Asynchronous Methods -- Using AggregateException Information -- Cancellation of async Methods -- Async Streams -- Async with Windows Apps
- Native Integer Types -- Digit Separators -- Binary Values -- Floating-Point Types -- The Boolean Type -- The Character Type -- Literals for Numbers -- The object Type -- Controlling Program Flow -- The if Statement -- Pattern Matching with the is Operator -- The switch Statement -- Pattern Matching with the switch Statement -- The switch Expression -- The for Loop -- The while Loop -- The do-while Loop -- The foreach Loop -- Exiting Loops -- Organization with Namespaces -- The using Directive -- Namespace Aliases -- Working with Strings -- Using the StringBuilder -- String Interpolation -- FormattableString -- String Formats -- Verbatim Strings -- Ranges with Strings -- Comments -- Internal Comments Within the Source Files -- XML Documentation -- C# Preprocessor Directives -- #define and #undef -- #if, #elif, #else, and #endif -- #warning and #error -- #region and #endregion -- #line -- #pragma -- #nullable -- C# Programming Guidelines -- Rules for Identifiers -- Usage Conventions -- Naming Conventions -- Casing of Names -- Name Styles -- Namespace Names -- Names and Keywords -- Use of Properties and Methods -- Use of Fields -- Summary -- Chapter 3 Classes, Records, Structs, and Tuples -- Creating and Using Types -- Pass by Value or by Reference -- Classes -- Fields -- Readonly Fields -- Properties -- Auto-ImplementedProperties -- Access Modifiers for Properties -- Readonly Properties -- Expression-BodiedProperties -- Auto-ImplementedRead-OnlyProperties -- Init-OnlySet Accessors -- Methods -- Declaring Methods -- Expression-BodiedMethods -- Invoking Methods -- Method Overloading -- Named Arguments -- Optional Arguments -- Variable Number of Arguments -- Constructors -- Expression Bodies with Constructors -- Calling Constructors from Other Constructors -- Static Constructors -- Local Functions -- Generic Methods -- Extension Methods -- Anonymous Types
- Casts Between Classes -- Casts Between Base and Derived Classes -- Boxing and Unboxing Casts -- Multiple Casting -- Summary -- Chapter 6 Arrays -- Multiple Objects of the Same Type -- Simple Arrays -- Array Declaration and Initialization -- Accessing Array Elements -- Using Reference Types -- Multidimensional Arrays -- Jagged Arrays -- Array Class -- Creating Arrays -- Copying Arrays -- Sorting -- Arrays as Parameters -- Enumerators -- IEnumerator Interface -- foreach Statement -- yield Statement -- Using Span with Arrays -- Creating Slices -- Changing Values Using Spans -- ReadOnly Spans -- Indices and Ranges -- Indices and the Hat Operator -- Ranges -- Efficiently Changing Array Content -- Indices and Ranges with Custom Collections -- Array Pools -- Creating the Array Pool -- Renting Memory from the Pool -- Returning Memory to the Pool -- BitArray -- Summary -- Chapter 7 Delegates, Lambdas, and Events -- Referencing Methods -- Delegates -- Declaring Delegates -- Using Delegates -- Passing Delegates to Methods -- Action< -- T> -- and Func< -- T> -- Delegates -- Multicast Delegates -- Anonymous Methods -- Lambda Expressions -- Parameters -- Multiple Code Lines -- Closures -- Events -- Event Publisher -- Event Listener -- Summary -- Chapter 8 Collections -- Overview -- Collection Interfaces and Types -- Lists -- Creating Lists -- Collection Initializers -- Adding Elements -- Inserting Elements -- Accessing Elements -- Removing Elements -- Searching -- Sorting -- Read-Only Collections -- Queues -- Stacks -- Linked Lists -- Sorted List -- Dictionaries -- Dictionary Initializers -- Key Type -- Dictionary Example -- Lookups -- Sorted Dictionaries -- Sets -- Performance -- Immutable Collections -- Using Builders with Immutable Collections -- Immutable Collection Types and Interfaces -- Using LINQ with Immutable Arrays -- Summary
- Cover -- Title Page -- Copyright Page -- About the Author -- Acknowledgments -- Contents -- Introduction -- The World of .NET -- The World of C# -- What's New in C# -- What's New in ASP.NET Core -- What's New with Windows -- What You Need to Write and Run C# Code -- What This Book Covers -- Part I, "The C# Language" -- Part II, "Libraries" -- Part III, "Web Applications and Services" -- Part IV, "Apps" -- Conventions -- Source Code -- Errata -- Part I The C# Language -- Chapter 1 .NET Applications and Tools -- From .NET Framework to .NET Core to .NET -- .NET Terms -- .NET SDK -- .NET Runtime -- Common Language Runtime -- .NET Compiler Platform -- .NET Framework -- .NET Core -- .NET -- .NET Standard -- NuGet Packages -- Namespaces -- .NET Support Length -- Application Types and Technologies -- Data Access -- Windows Apps -- Web Applications -- Services -- SignalR -- Microsoft Azure -- Software as a Service -- Infrastructure as a Service -- Platform as a Service -- Functions as a Service -- Developer Tools -- .NET CLI -- Visual Studio Code -- Visual Studio Community -- Visual Studio Professional -- Visual Studio Enterprise -- Visual Studio for Mac -- Windows Terminal -- WSL 2 -- Docker Desktop -- Using the .NET CLI -- Creating the Application -- Top-Level Statements -- Selecting the Framework and Language Versions -- Building the Application -- Running the Application -- Creating a Web Application -- Publishing the Application -- Self-Contained Deployments -- Creating a Single Executable -- ReadyToRun -- Trimming -- Summary -- Chapter 2 Core C# -- Fundamentals of C# -- Top-Level Statements -- Variables -- Command-Line Arguments -- Understanding Variable Scope -- Constants -- Methods and Types with Top-Level Statements -- Nullable Types -- Nullable Value Types -- Nullable Reference Types -- Using Predefined Types -- Integer Types -- Big Integer
- Records -- Immutable Types -- Nominal Records -- Positional Records -- Equality Comparison with Records -- With Expressions -- Structs -- Enum Types -- ref, in, and out -- ref Parameters -- in Parameters -- ref return -- out Parameters -- Tuples -- Declaring and Initializing Tuples -- Tuple Deconstruction -- Returning Tuples -- ValueTuple -- Deconstruction -- Pattern Matching -- Pattern Matching with Tuples -- Property Pattern -- Partial Types -- Summary -- Chapter 4 Object-Oriented Programming in C# -- Object Orientation -- Inheritance with Classes -- Virtual Methods -- Hiding Methods -- Calling Base Versions of Methods -- Abstract Classes and Methods -- Sealed Classes and Methods -- Constructors of Derived Classes -- Modifiers -- Access Modifiers -- Other Modifiers -- Inheritance with Records -- Using Interfaces -- Predefined Interfaces -- Dependency Injection with Interfaces -- Explicit and Implicit Implemented Interfaces -- Comparing Interfaces and Classes -- Default Interface Methods -- Avoiding Breaking Changes -- Traits with C# -- Generics -- Constraints -- Summary -- Chapter 5 Operators and Casts -- Operators -- Compound Assignment Operators -- The Conditional-Expression Operator (?:) -- The checked and unchecked Operators -- The is and as Operators -- The sizeof Operator -- The typeof Operator -- The nameof Expression -- The Indexer -- The Null-Coalescing and Null-Coalescing Assignment Operators -- The Null-Conditional Operator -- Using Binary Operators -- Shifting Bits -- Signed and Unsigned Numbers -- Type Safety -- Type Conversions -- Implicit Conversions -- Explicit Conversions -- Boxing and Unboxing -- Operator Overloading -- How Operators Work -- Operator Overloading with the Vector Type -- Comparing Objects for Equality -- Implementing Custom Indexers -- User-Defined Conversions -- Implementing User-Defined Casts

