Pro C# 10 with .NET 6: Foundational Principles and Practices in Programming

Book description

Welcome to the most comprehensive foundational guide available on the topic of C# coding and .NET. This book goes beyond “do this, to achieve this” to drill down into the core stuff that makes a good developer, great. This expanded 11th edition delivers loads of new content on Entity Framework, Razor Pages, Web APIs and more. You will find the latest C# 10 and .NET 6 features served up with plenty of “behind the curtain” discussion designed to expand developers’ critical thinking skills when it comes to their craft. Coverage of ASP.NET Core, Entity Framework Core, and more sits alongside the latest updates to the new unified .NET platform, from performance improvements to Windows Desktop apps on .NET 6, updates in XAML tooling, and expanded coverage of data files and data handling. Going beyond the latest features in C# 10, all code samples are rewritten for this latest release.

Dive in and discover why this essential classic is a favorite of C# developers worldwide. Gain a solid foundation in object-oriented development techniques, attributes and reflection, generics and collections, and numerous advanced topics not found in other texts (such as CIL opcodes and emitting dynamic assemblies). Pro C# 10 with .NET 6 will build your coding confidence putting C# into practice, and exploring the .NET universe and its vast potential on your own terms.

What You Will Learn

  • Explore C# 10 features and updates in records and record structs, global and implicit using directives, file level namespaces, extended property patterns, and more
  • Develop applications with C# and modern frameworks for services, web, and smart client applications
  • Hit the ground running with ASP.NET Core web applications using MVC and Razor Pages, including view components, custom tag helpers, custom validation, GDPR support, and areas
  • Build ASP.NET RESTful services complete with versioning, enhanced swagger, and basic authentication
  • Embrace Entity Framework Core for building real-world, data-centric applications, with deeply expanded coverage new to this edition including SQL Server temporal table support
  • Dive into Windows Desktop Apps on .NET 6 using Windows Presentation Foundation
  • Understand the philosophy behind .NET
  • Discover the new features in .NET 6, including single file applications, smaller container images, and more

Who This Book Is For

Developers of any level who want to either learn C# and .NET or want to take their skills to the next level.


“Amazing! Provides easy-to-follow explanations and examples. I remember reading the first version of this book; this is a ‘must-have’ for your collection if you are learning .NET!”

– Rick McGuire, Senior Application Development Manager, Microsoft

“Phil is a journeyman programmer who brings years of experience and a passion for teaching to make this fully revised and modernized ‘classic’ a ‘must-have’. Any developer who wants full-spectrum, up-to-date coverage of both the C# language and how to use it with .NET and ASP.NET Core should get this book.”

– Brian A. Randell, Partner, MCW Technologies and Microsoft MVP

Table of contents

  1. Cover
  2. Front Matter
  3. Part I. Introducing C# and .NET 6
    1. 1. Introducing C# and .NET 6
    2. 2. Building C# Applications
  4. Part II. Core C# Programming
    1. 3. Core C# Programming Constructs, Part 1
    2. 4. Core C# Programming Constructs, Part 2
  5. Part III. Object Oriented Programming with C#
    1. 5. Understanding Encapsulation
    2. 6. Understanding Inheritance and Polymorphism
    3. 7. Understanding Structured Exception Handling
    4. 8. Working with Interfaces
    5. 9. Understanding Object Lifetime
  6. Part IV. Advanced C# Programming
    1. 10. Collections and Generics
    2. 11. Advanced C# Language Features
    3. 12. Delegates, Events, and Lambda Expressions
    4. 13. LINQ to Objects
    5. 14. Processes, AppDomains, and Load Contexts
    6. 15. Multithreaded, Parallel, and Async Programming
  7. Part V. Programming with .NET Core Assemblies
    1. 16. Building and Configuring Class Libraries
    2. 17. Type Reflection, Late Binding, Attribute, and Dynamic Types
    3. 18. Understanding CIL and the Role of Dynamic Assemblies
  8. Part VI. File Handling, Object Serialization, and Data Access
    1. 19. File I/O and Object Serialization
    2. 20. Data Access with ADO.NET
  9. Part VII. Entity Framework Core
    1. 21. Introducing Entity Framework Core
    2. 22. Exploring Entity Framework Core
    3. 23. Build a Data Access Layer with Entity Framework Core
    4. 24. Test-Driving AutoLot
  10. Part VIII. Windows Client Development
    1. 25. Introducing Windows Presentation Foundation and XAML
    2. 26. WPF Controls, Layouts, Events, and Data Binding
    3. 27. WPF Graphics Rendering Services
    4. 28. WPF Resources, Animations, Styles, and Templates
    5. 29. WPF Notifications, Validations, Commands, and MVVM
  11. Part IX. ASP.NET Core
    1. 30. Introducing ASP.NET Core
    2. 31. Diving Into ASP.NET Core
    3. 32. RESTful Services with ASP.NET Core
    4. 33. Web Applications with MVC
    5. 34. Web Applications using Razor Pages
  12. Back Matter

Product information

  • Title: Pro C# 10 with .NET 6: Foundational Principles and Practices in Programming
  • Author(s): Andrew Troelsen, Phil Japikse
  • Release date: July 2022
  • Publisher(s): Apress
  • ISBN: 9781484278697