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, wor
Essential C# 8.0.
β Scribed by Mark Michaelis; Kevin Bost (editor); Eric Lippert (editor)
- Year
- 2021
- Tongue
- English
- Leaves
- 1087
- Series
- Addison-Wesley Microsoft technology series
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Table of Contents
Cover
Half Title
Title Page
Copyright Page
Contents at a Glance
Contents
Figures
Tables
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
2 Data Types
Fundamental Numeric Types
More Fundamental Types
Conversions between Data Types
3 More with Data Types
Categories of Types
Declaring Types That Allow null
Implicitly Typed Local Variables
Tuples
Arrays
4 Operators and Flow Control
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 Methods and Parameters
Calling a Method
Declaring a Method
The using Directive
Returns and Parameters on Main()
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
Pattern Matching with the is Operator
Pattern Matching within a switch Expression
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
9 Value Types
Structs
Boxing
Enums
Summary
10 Well-Formed Types
Overriding object Members
Operator Overloading
Referencing Other Assemblies
Encapsulation of Types
Defining Namespaces
XML Comments
Garbage Collection
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
Anonymous Methods
Delegates Do Not Have Structural Equality
Outer Variables
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 7.0 Topics
A
B
C
D
I
L
N
O
P
R
S
T
U
V
Index of 6.0 Topics
A
C
D
E
G
N
R
S
U
V
π SIMILAR VOLUMES
This is an excellent book about C# the language. Please read that again, as I can see a lot of people mistake what this book is - it is NOT a book about .Net (although it definitely is related to that) or about any specific frameworks that _use_ C#, such as WPF or ASP.Net or anything like that. It's
<BLOCKQUOTE>Β </BLOCKQUOTE> <P style="MARGIN: 0px"><B><I><B>Essential C# 4.0</B></I></B> is a well-organized,βno-fluffβ guide to all versions of C# for programmers at all levels of C# experience. This fully updated edition shows how to make the most of C# 4.0βs new features and programming patterns
A guide to the C# programming language covers such topics as syntax fundamentals, working with variables, console input and output, common intermediate language data strings, exception handling, and multithreading patterns.
<p style="margin:0px;"> </p> <p style="margin:0px;"> <i>β Welcome to one of the greatest collaborations you could dream of in the world of C# booksβand probably far beyond!β</i> </p> <p style="margin:0px;">βFrom the Foreword by Mads Torgersen, C# Program Manager, Microsoft</p> <p style="margin:0px;"
<p style="margin:0px;"> <b>The Comprehensive, Expert Guide to the C# 7.0 Language and Programming Paradigms</b> </p> <p style="margin:0px;">Β </p> <p style="margin:0px;"> <i>βThis book has been a classic for years, and remains one of the most venerable and trusted titles in the world of C# content, a