Op werkdagen voor 23:00 besteld, morgen in huis Gratis verzending vanaf €20

Programming C# 12.0

Build Cloud, Web, and Desktop Applications

Paperback Engels 2024 1e druk 9781098158361
Verkooppositie 3595Hoogste positie: 3595
Verwachte levertijd ongeveer 16 werkdagen

Samenvatting

C# is undeniably one of the most versatile programming languages available to engineers today. With this comprehensive guide, you'll learn just how powerful the combination of C# and .NET can be. Author Ian Griffiths guides you through C# 12.0 and .NET 8 fundamentals and techniques for building cloud, web, and desktop applications.

Designed for experienced programmers, this book provides many code examples to help you work with the nuts and bolts of C#, such as generics, LINQ, and asynchronous programming features. You'll get up to speed on .NET 8 and the latest C# 11.0 and 12.0 additions, including generic math, new polymorphism options, enhanced pattern matching, and new features designed to improve productivity.

This book helps you:
- Understand how .NET has changed in recent releases and learn what it means for application development
- Select the appropriate C# language features for any task
- Learn when to use the new features and when to stick with older ones
- Examine the range of functionality in .NET's class libraries
- Apply these class libraries to practical programming tasks
- Explore numerous small additions to .NET that improve expressiveness
- Show and hide more

Specificaties

ISBN13:9781098158361
Trefwoorden:Programmeren, C# 12
Taal:Engels
Bindwijze:paperback
Aantal pagina's:833
Uitgever:O'Reilly
Druk:1
Verschijningsdatum:21-6-2024
Hoofdrubriek:IT-management / ICT
ISSN:

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

Preface
Who This Book Is For
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments

1. Introducing C#
Why C#?
Managed Code and the CLR
C# Prefers Generality to Specialization
C# Standards and Implementations
Many .NETs
Release Cycles and Long Term Support
Targeting Multiple .NET Runtimes
Visual Studio, Visual Studio Code, and JetBrains Rider
Anatomy of a Simple Program
Writing a Unit Test
Namespaces
Classes
Unit Tests
Summary

2. Basic Coding in C#
Local Variables
Scope
Variable Name Ambiguity
Local Variable Instances
Statements and Expressions
Statements
Expressions
Comments and Whitespace
Preprocessing Directives
Compilation Symbols
#error and #warning
#line
#pragma
#nullable
#region and #endregion
Fundamental Data Types
Numeric Types
Booleans
Strings and Characters
Tuples
Tuple Deconstruction
Dynamic
Object
Operators
Flow Control
Boolean Decisions with if Statements
Multiple Choice with switch Statements
Loops: while and do
C-Style for Loops
Collection Iteration with foreach Loops
Patterns
Combining and Negating Patterns
Relational Patterns
Getting More Specific with when
Patterns in Expressions
Summary

3. Types
Classes
Initialization Inputs
Static Members
Static Classes
Records
References and Nulls
Banishing Null with Non-Nullable References
Structs
When to Write a Value Type
Guaranteeing Immutability
Record Structs
Class, Structs, Records, or Tuples?
Members
Accessibility
Fields
Constructors
Deconstructors
Methods
Properties
Operators
Events
Nested Types
Interfaces
Default Interface Implementation
Static Virtual Members
Enums
Other Types
Anonymous Types
Partial Types and Methods
Summary

4. Generics
Generic Types
Constraints
Type Constraints
Reference Type Constraints
Value Type Constraints
Value Types All the Way Down with Unmanaged Constraints
Not Null Constraints
Other Special Type Constraints
Multiple Constraints
Zero-Like Values
Generic Methods
Type Inference
Generic Math
Generic Math Interfaces
Numeric Category Interfaces
Operator Interfaces
Function Interfaces
Parsing and Formatting
Generics and Tuples
Summary

5. Collections
Arrays
Array Initialization
Searching and Sorting
Multidimensional Arrays
Copying and Resizing
List<T>
List and Sequence Interfaces
Implementing Lists and Sequences
Implementing IEnumerable<T> with Iterators
Collection<T>
ReadOnlyCollection<T>
Addressing Elements with Index and Range Syntax
System.Index
System.Range
Supporting Index and Range in Your Own Types
Dictionaries
Sorted Dictionaries
Sets
Queues and Stacks
Linked Lists
Concurrent Collections
Immutable Collections
Frozen Collections
Summary

6. Inheritance
Inheritance and Conversions
Interface Inheritance
Generics
Covariance and Contravariance
System.Object
The Ubiquitous Methods of System.Object
Accessibility and Inheritance
Virtual Methods
Abstract Methods
Inheritance and Library Versioning
Static Virtual Methods
Default Constraints
Sealed Methods and Classes
Accessing Base Members
Inheritance and Construction
Primary Constructors
Mandatory Properties
Field Initialization
Record Types
Records, Inheritance, and the with Keyword
Special Base Types
Summary

7. Object Lifetime
Garbage Collection
Determining Reachability
Accidentally Defeating the Garbage Collector
Weak References
Reclaiming Memory
Lightening the Load with Inline Arrays
Garbage Collector Modes
Temporarily Suspending Garbage Collections
Accidentally Defeating Compaction
Forcing Garbage Collections
Destructors and Finalization
IDisposable
Optional Disposal
Boxing
Boxing Nullable<T>
Summary

8. Exceptions
Exception Sources
Exceptions from APIs
Failures Detected by the Runtime
Handling Exceptions
Exception Objects
Multiple catch Blocks
Exception Filters
Nested try Blocks
finally Blocks
Throwing Exceptions
Rethrowing Exceptions
Failing Fast
Exception Types
Custom Exceptions
Unhandled Exceptions
Summary

9. Delegates, Lambdas, and Events
Delegate Types
Creating a Delegate
Multicast Delegates
Invoking a Delegate
Common Delegate Types
Type Compatibility
Behind the Syntax
Anonymous Functions
Lambdas and Default Arguments
Captured Variables
Lambdas and Expression Trees
Events
Standard Event Delegate Pattern
Custom Add and Remove Methods
Events and the Garbage Collector
Events Versus Delegates
Delegates Versus Interfaces
Summary

10. LINQ
Query Expressions
How Query Expressions Expand
Deferred Evaluation
LINQ, Generics, and IQueryable<T>
Standard LINQ Operators
Filtering
Select
SelectMany
Ordering
Containment Tests
Specific Items and Subranges
Whole-Sequence, Order-Preserving Operations
Aggregation
Grouping
Conversion
Sequence Generation
Other LINQ Implementations
Entity Framework Core
Parallel LINQ (PLINQ)
LINQ to XML
IAsyncEnumerable<T>
Reactive Extensions
Summary

11. Rx: Reactive Extensions
Fundamental Interfaces
IObserver<T>
IObservable<T>
Publishing and Subscribing with Delegates
Creating an Observable Source with Delegates
Subscribing to an Observable Source with Delegates
Sequence Builders
Empty
Never
Return
Throw
Range
Repeat
Generate
LINQ Queries
Grouping Operators
Join Operators
SelectMany Operator
Aggregation and Other Single-Value Operators
Concat Operator
Rx Query Operators
Merge
Windowing Operators
The Scan Operator
The Amb Operator
DistinctUntilChanged
Schedulers
Specifying Schedulers
Built-in Schedulers
Subjects
Subject<T>
BehaviorSubject<T>
ReplaySubject<T>
AsyncSubject<T>
Adaptation
IEnumerable<T> and IAsyncEnumerable<T>
.NET Events
Asynchronous APIs
Timed Sequences
Timed Sources
Timed Operators
Timed Windowing Operators
Reaqtor—Rx as a Service
Summary

12. Assemblies and Deployment
Anatomy of an Assembly
.NET Metadata
Resources
Multifile Assemblies
Other PE Features
Type Identity
Deployment
Framework-Dependent
Self-Contained
Trimming
Ahead-of-Time (AOT) Compilation
Loading Assemblies
Assembly Resolution
Explicit Loading
Isolation and Plug-ins with AssemblyLoadContext
Assembly Names
Strong Names
Version
Version Numbers and Assembly Loading
Culture
Protection
Target Frameworks and .NET Standard
Summary

13. Reflection
Reflection Types
Assembly
Module
MemberInfo
Type and TypeInfo
Generic Types
MethodBase, ConstructorInfo, and MethodInfo
ParameterInfo
FieldInfo
PropertyInfo
EventInfo
Reflection Contexts
Summary

14. Attributes
Applying Attributes
Attribute Targets
Compiler-Handled Attributes
CLR-Handled Attributes
Debugging Attributes
Build-Time Attributes
Defining and Consuming Attributes
Attribute Types
Retrieving Attributes
Metadata-Only Load
Generic Attribute Types
Summary

15. Files and Streams
The Stream Class
Position and Seeking
Flushing
Copying
Length
Disposal
Asynchronous Operation
Concrete Stream Types
One Type, Many Behaviors
Text-Oriented Types
TextReader and TextWriter
Concrete Reader and Writer Types
Encoding
Files and Directories
FileStream Class
File Class
Directory Class
Path Class
Serialization
BinaryReader, BinaryWriter, and BinaryPrimitives
CLR Serialization
JSON
Summary

16. Multithreading
Threads
Threads, Variables, and Shared State
Thread-Local Storage
The Thread Class
The Thread Pool
Thread Affinity and SynchronizationContext
ExecutionContext
Synchronization
Monitors and the lock Keyword
Other Synchronization Primitives
Interlocked
Lazy Initialization
Other Class Library Concurrency Support
Tasks
The Task and Task<T> Classes
Continuations
Schedulers
Error Handling
Custom Threadless Tasks
Parent/Child Relationships
Composite Tasks
Other Asynchronous Patterns
Cancellation
Parallelism
The Parallel Class
Parallel LINQ
TPL Dataflow
Summary

17. Asynchronous Language Features
Asynchronous Keywords: async and await
Execution and Synchronization Contexts
Multiple Operations and Loops
Returning a Task
Applying async to Nested Methods
The await Pattern
Error Handling
Validating Arguments
Singular and Multiple Exceptions
Concurrent Operations and Missed Exceptions
Summary

18. Memory Efficiency
(Don’t) Copy That
Representing Sequential Elements with Span<T>
Utility Methods
Collection Expressions and Spans
Pattern Matching
Stack Only
Using ref with Fields
Representing Sequential Elements with Memory<T>
ReadOnlySequence<T>
Processing Data Streams with Pipelines
Processing JSON in ASP.NET Core
Summary

Index
About the Author

Managementboek Top 100

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        Programming C# 12.0