Essential C# 6.0 is a well-organized, no-fluff guide to the latest versions of C# for programmers at all levels of experience. Fully updated to reflect new C# 6.0 and .NET 4.6 features and patterns, it will help you write C# code that's simple, powerful, robust, secure, and maintainable. This book'
Essential C# 12.0, 8th Edition
β Scribed by Mark Michaelis, Kevin Bos
- Publisher
- Addison-Wesley
- Year
- 2024
- Tongue
- English
- Leaves
- 1232
- Series
- The addison-wesley microsoft tehcnology series
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
The Comprehensive, Expert Guide to C# 12.0 for Programmers at All Levels
Updated for the Microsoft C# 12.0 Long Term Support (LTS) release, Essential C# 12.0 is a well-organized, no-fluff C# guide, suitable for every programmer. Building on the proven, high-value content of previous editions, world-class C# expert Mark Michaelis illuminates key enhancements in C# 12.0, including any-type aliases, inline arrays, default lambda expression parameters, and expanded support for primary constructors.
Michaelis presents a comprehensive tutorial and reference for the entire C# language, helping you accelerate your journey to expert-level C# programmer. Succinct examples illustrate core constructs, and modern coding guidelines help you minimize bugs and write code that's easier to evolve. To help you quickly find what you need and maintain compatibility, the book includes version-specific icons and notes identifying when each 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, and lambda expressions
β’ Take full advantage of collections with LINQ
β’ Improve multithreading with the taskbased async pattern and asynchronous streams
β’ Enhance performance through the parallel processing of data and multithreading tasks
β’ Make the most of refl ection, attributes, and the declarative programming paradigm
β’ Program complex types with enhanced pattern matching syntax
β’ Write succinct type defi nitions with record structs and classes
β’ Explore the new features of C# 8.0-C# 12.0
β¦ Table of Contents
Cover
Title Page
Copyright Page
Contents at a Glance
Contents
Foreword
Preface
Acknowledgments
About the Author
1 Introducing C#
Hello, World
C# Syntax Fundamentals
Working with Variables
Console Input and Output
Managed Execution and the Common Language Infrastructure
Multiple .NET Frameworks
Summary
2 Data Types
Type Name Forms
Fundamental Numeric Types
More Fundamental Types
Conversions between Data Types
Summary
3 More with Data Types
Categories of Types
Declaring Types That Allow null
Implicitly Typed Local Variables
Tuples
Arrays
Summary
4 Operators and Control Flow
Operators
Introducing Flow Control
Code Blocks ({})
Code Blocks, Scopes, and Declaration Spaces
Boolean Expressions
Programming with null
Bitwise Operators (<<, >>, |, &, ^, ~)
Control Flow Statements, Continued
Jump Statements
C# Preprocessor Directives
Summary
5 Parameters and Methods
Calling a Method
Declaring a Method
Local Functions
Using Directives
Returns and Parameters on Main Method
Top-Level Statements
Advanced Method Parameters
Recursion
Method Overloading
Optional Parameters
Basic Error Handling with Exceptions
Summary
6 Classes
Declaring and Instantiating a Class
Instance Fields
Instance Methods
Using the this Keyword
Access Modifiers
Properties
Constructors
Non-Nullable Reference Type Properties with Constructors
Nullable Attributes
Deconstructors
Static Members
Extension Methods
Encapsulating the Data
Nested Classes
Partial Classes
Summary
7 Inheritance
Derivation
Overriding the Base Class
Abstract Classes
All Classes Derive from System.Object
Type Checking
Pattern Matching
Avoid Pattern Matching When Polymorphism Is Possible
Summary
8 Interfaces
Introducing Interfaces
Polymorphism through Interfaces
Interface Implementation
Converting between the Implementing Class and Its Interfaces
Interface Inheritance
Multiple Interface Inheritance
Extension Methods on Interfaces
Versioning
Extension Methods versus Default Interface Members
Interfaces Compared with Abstract Classes
Interfaces Compared with Attributes
Summary
9 Introducing Structs and Records
Reference Equality versus Value Equality
Structs
Record Classes
Record Class Inheritance
Records
Overriding object Members
Customizing Record Behavior
Boxing
Enums
Summary
10 Well-Formed Types
Operator Overloading
Referencing Other Assemblies
Encapsulation of Types
Defining Namespaces
XML Comments
Garbage Collection and Weak References
Resource Cleanup
Lazy Initialization
Summary
11 Exception Handling
Multiple Exception Types
Catching Exceptions
Rethrowing an Existing Exception
General Catch Block
Guidelines for Exception Handling
Defining Custom Exceptions
Rethrowing a Wrapped Exception
Summary
12 Generics
C# without Generics
Introducing Generic Types
Constraints
Generic Methods
Covariance and Contravariance
Generic Internals
Summary
13 Delegates and Lambda Expressions
Introducing Delegates
Declaring Delegate Types
Lambda Expressions
Statement Lambdas
Expression Lambdas
Anonymous Methods
Delegates Do Not Have Structural Equality
Outer Variables
Static Anonymous Functions
Expression Trees
Summary
14 Events
Coding the PublishβSubscribe Pattern with Multicast Delegates
Understanding Events
Summary
15 Collection Interfaces with Standard Query Operators
Collection Initializers
What Makes a Class a Collection: IEnumerable
Standard Query Operators
Anonymous Types with LINQ
Summary
16 LINQ with Query Expressions
Introducing Query Expressions
Query Expressions Are Just Method Invocations
Summary
17 Building Custom Collections
More Collection Interfaces
Primary Collection Classes
Providing an Indexer
Returning null or an Empty Collection
Iterators
Summary
18 Reflection, Attributes, and Dynamic Programming
Reflection
nameof Operator
Attributes
Programming with Dynamic Objects
Summary
19 Introducing Multithreading
Multithreading Basics
Asynchronous Tasks
Canceling a Task
Working with System.Threading
Summary
20 Programming the Task-Based Asynchronous Pattern
Synchronously Invoking a High-Latency Operation
Asynchronously Invoking a High-Latency Operation Using the TPL
The Task-Based Asynchronous Pattern with async and await
Introducing Asynchronous Return of ValueTask
Asynchronous Streams
IAsyncDisposable and the await using Declaration and Statement
Using LINQ with IAsyncEnumerable
Returning void from an Asynchronous Method
Asynchronous Lambdas and Local Functions
Task Schedulers and the Synchronization Context
async/await with the Windows UI
Summary
21 Iterating in Parallel
Executing Loop Iterations in Parallel
Running LINQ Queries in Parallel
Summary
22 Thread Synchronization
Why Synchronization?
Timers
Summary
23 Platform Interoperability and Unsafe Code
Platform Invoke
Pointers and Addresses
Executing Unsafe Code via a Delegate
Summary
24 The Common Language Infrastructure
Defining the Common Language Infrastructure
CLI Implementations
NET Standard
Base Class Library
C# Compilation to Machine Code
Runtime
Assemblies, Manifests, and Modules
Common Intermediate Language
Common Type System
Common Language Specification
Metadata
.NET Native and Ahead of Time Compilation
Summary
Index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Index of 8.0 Topics
A
B
C
D
I
N
P
R
S
T
U
Index of 9.0 Topics
F
I
P
R
S
T
Index of 10.0 Topics
A
C
E
F
G
I
R
Index of 11.0 Topics
A
E
F
G
I
L
N
P
R
U
Index of 12.0 Topics
A
D
I
P
π SIMILAR VOLUMES
<p> <b>Essential C# 8.0</b>Β is a well-organized, no-fluff guide to C# 8.0 for programmers at all levels of experience. Reflecting the most important C# features, it will help you write code thatβs simple, powerful, robust, secure, and maintainable.</p> <p>Author Mark Michaelis is a world-class C# ex
<p> <b>Essential C# 8.0</b>Β is a well-organized, no-fluff guide to C# 8.0 for programmers at all levels of experience. Reflecting the most important C# features, it will help you write code thatβs simple, powerful, robust, secure, and maintainable.</p> <p>Author Mark Michaelis is a world-class C# ex
Written by Oracle insiders, this indispensable guide distills an enormous amount of information about the Oracle Database into one compact volume. Ideal for novice and experienced DBAs, developers, managers, and users, Oracle Essentials walks you through technologies and features in Oracle's product
Pick up the sociology textbook that helps you study, is easy to read, and has the study aids built right in. ESSENTIALS OF SOCIOLOGY takes real-world scenarios and shows you how to use sociology to analyze them. And with its updated international focus, you'll learn about other cultures while studyi