C# 10 and .NET 6 – Modern Cross-Platform Development: Build apps, websites, and services with ASP.NET Core 6, Blazor, and EF Core 6 using Visual Studio 2022 and Visual Studio Code, 6th Edition 6th ed. Edition
Mark J. Price (Author) Find all the books, read about the author, and more. See search results for this author |



Use the Amazon App to scan ISBNs and compare prices.

A comprehensive guide for beginners to learn the key concepts, real-world applications, and latest features of C# 10 and .NET 6 with hands-on exercises using Visual Studio 2022 and Visual Studio Code
Key Features
- Explore the newest additions to C# 10, the .NET 6 class library, and Entity Framework Core 6
- Create professional websites and services with ASP.NET Core 6 and Blazor
- Build cross-platform apps for Windows, macOS, Linux, iOS, and Android
Book Description
Extensively revised to accommodate all the latest features that come with C# 10 and .NET 6, this latest edition of our comprehensive guide will get you coding in C# with confidence.
You'll learn object-oriented programming, writing, testing, and debugging functions, implementing interfaces, and inheriting classes. The book covers the .NET APIs for performing tasks like managing and querying data, monitoring and improving performance, and working with the filesystem, async streams, and serialization. You'll build and deploy cross-platform apps, such as websites and services using ASP.NET Core.
Instead of distracting you with unnecessary application code, the first twelve chapters will teach you about C# language constructs and many of the .NET libraries through simple console applications. In later chapters, having mastered the basics, you'll then build practical applications and services using ASP.NET Core, the Model-View-Controller (MVC) pattern, and Blazor.
What you will learn
- Build rich web experiences using Blazor, Razor Pages, the Model-View-Controller (MVC) pattern, and other features of ASP.NET Core
- Build your own types with object-oriented programming
- Write, test, and debug functions
- Query and manipulate data using LINQ
- Integrate and update databases in your apps using Entity Framework Core, Microsoft SQL Server, and SQLite
- Build and consume powerful services using the latest technologies, including gRPC and GraphQL
- Build cross-platform apps using XAML
Who this book is for
Designed for both beginners and C# and .NET programmers who have worked with C# in the past and want to catch up with the changes made in the past few years, this book doesn't need you to have any C# or .NET experience. However, you should have a general understanding of programming before you jump in.
Table of Contents
- Hello C#, Welcome .NET!
- Speaking C#
- Controlling Flow, Converting Types, and Handling Exceptions
- Writing, Debugging, and Testing Functions
- Building Your Own Types with Object-Oriented Programming
- Implementing Interfaces and Inheriting Classes
- Packaging and Distributing .NET Types
- Working with Common .NET Types
- Working with Files, Streams, and Serialization
- Working with Data Using Entity Framework Core
- Querying and Manipulating Data Using LINQ
- Improving Performance and Scalability Using Multitasking
- Introducing Practical Applications of C# and .NET
- Building Websites Using ASP.NET Core Razor Pages
- Building Websites Using the Model-View-Controller Pattern
- Building and Consuming Web Services
- Building User Interfaces Using Blazor
- Bonus Content: Building and Consuming Specialized Services
- Bonus Content: Building Mobile and Desktop Apps Using .NET MAUI
- Bonus Content: Protecting Your Data and Applications
- Bonus Content: Appendix – Answers to the Test Your Knowledge Questions
Customers who viewed this item also viewed
From the Publisher


Key Takeaways:
- Use all the new minimal code features of C# 10 and .NET 6 to write clean code for completing common tasks
- Write real code quickly without wasting your time on esoteric language features that you may never use
- Create a functional website and services using various tools and technologies with a fully working and updatable database
What’s new in this sixth edition?
For this sixth edition, I went through the whole book and brought everything up-to-date for C# 10 and .NET 6.
I’ve rewritten the instructions to use almost any code editor or IDE instead of Visual Studio Code, with instructions for Visual Studio 2022 and Visual Studio Code in chapter 1. The book’s GitHub repo has pre-built notebooks with code from chapters 1 to 13 so you can quickly explore code examples. Along with the 17 chapters, you’ll find 3 chapters as added content in the GitHub repo.
- Updated to cover the latest additions to C# 10 and the .NET 6 class library
- Adds coverage of Code First database models for Entity Framework Core
- Provides coverage of new library functionality like PriorityQueue, DateOnly, TimeOnly, and LINQ extension methods
- Covers more specialized types of service, such as gRPC, SignalR, OData, and GraphQL

How does the book prepare readers to get started with C# 10 and .NET 6?
This sixth edition is a guide to learning modern C# proven practices using cross-platform .NET and a brief introduction to the main types of practical applications that you can build with them. The book is best for C# and .NET beginners, or programmers who've worked with C# in the past but feel left behind by the changes in the past few years.
This book will help you get started with C# 10 and .NET 6 by describing how to set up a development environment using any code editor that you prefer. I'll then show you how to write code in .NET Interactive Notebooks that makes it easy to explore snippets of code mixed with rich text for learning purposes.
I've also written the chapters in such a way that they will prepare you to deal with challenges and industry applications by using a mixture of conceptual descriptions, warnings about tricky areas, hands-on guided tasks, and exercises with solutions. It is practical and gets you quickly writing real code that you will benefit from every day.

How does your book differ from other books on C# 10 and .NET 6?
My approach to writing this book was to listen to you, my readers. I used the feedback I’ve received to update this edition.
There are programming books that are thousands of pages long that aim to be comprehensive references for the C# language, .NET libraries, app models like websites, services, and desktop, and mobile apps.
This book is different. It is concise and aims to be a brisk, fun read packed with practical hands-on walkthroughs of each subject. The breadth of the overarching narrative comes at the cost of some depth, but you will find many signposts to explore further if you wish.
I believe in the maxim, “Show, don’t tell”. After a short explanation, I like to jump right into example code that the reader can type themselves, run, and see the results. I also believe in seeing multiple examples that are similar but different so that you build up a clear model of that topic and the subtle reasons why there are often multiple ways to perform a task.
Finally, I’ve pointed out the cool corners and gotchas of C# and .NET, so you can impress colleagues and get productive quickly.
Key Topics Covered:
- Hello C#, Welcome .NET!
- Controlling Flow, Converting Types, and Handling Exceptions
- Building Your Own Types with Object-Oriented Programming
- Improving Performance and Scalability Using Multitasking
- Introducing Practical Applications of C# and .NET
- Building and Consuming Web Services
- Building User Interfaces Using Blazor
- ...and more!

Using C# and .NET to build websites on both the server & client side
Editorial Reviews
Review
"Every single edition of his book can be considered memorable. The care that Mark takes while describing each detail in the C# world is inspiring. So, I wouldn’t say this is a recommendation, but a message thanking Mark for all the work he’s been doing over the years to deliver incredible material to the community!" - Gabriel Lara Baptista, Author of Software Architecture with C# 9 and .NET 5, Professor and Software Architect for more than 20 years
"Mark's sixth edition of the book helps you develop C# skills, covering fundamentals to advanced topics—all while teaching you how to create cross-platform and modern apps, websites, and services using .NET 6." - David Pine, Senior Content Developer, Microsoft
“Mark has written an extremely easy-to-read guide to C# and .NET that uses tons of simple code examples to demonstrate various concepts. It's great for both beginner and seasoned developers since the chapters can be read in any order.” - Toi B. Wright, Author of Blazor WebAssembly by Example, 17-time Microsoft MVP in Developer Technologies
"This is not a regular book, but a whole development experience. I am impressed by how many topics you can find inside, but it’s still compact, with just enough information to get started. This is the book that I wanted when I started to learn .NET and the book I will recommend to my students." - Daniel Costea, Microsoft MVP
About the Author
Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Product details
- Publisher : Packt Publishing; 6th ed. edition (November 9, 2021)
- Language : English
- Paperback : 824 pages
- ISBN-10 : 1801077363
- ISBN-13 : 978-1801077361
- Item Weight : 3.06 pounds
- Dimensions : 7.5 x 1.86 x 9.25 inches
- Best Sellers Rank: #22,258 in Books (See Top 100 in Books)
- Customer Reviews:
About the author

Mark J Price is a former Microsoft Certified Trainer (MCT) and current Microsoft Specialist: Programming in C# and Architecting Microsoft Azure Solutions, with more than 20 years' of educational and programming experience.
Since 1993 Mark has passed more than 80 Microsoft programming exams and specializes in preparing others to pass them too. His students range from professionals with decades of experience to 16-year-old apprentices with none. Mark successfully guides all of them by combining educational skills with real-world experience consulting and developing systems for enterprises worldwide.
Between 2001 and 2003 Mark was employed full-time to write official courseware for Microsoft in Redmond, USA. Mark's team wrote the first training courses for C# while it was still an early alpha version. While with Microsoft he taught "train-the-trainer" classes to get other MCTs up-to-speed on C# and .NET.
Currently, Mark creates and delivers training courses for Episerver's Digital Experience Platform, the best .NET CMS for Digital Marketing and E-commerce.
In 2010 Mark studied for a Post-Graduate Certificate in Education (PGCE). He taught GCSE and A-Level mathematics in two London secondary schools. Mark holds a Computer Science BSc. Hons. Degree from the University of Bristol, UK.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews right now. Please try again later.
I'm about a fifth of the way through the book as I'm refreshing my C# skills after a couple of years away and updating to .NET 6. I've already learned things I never knew before or didn't fully understand. The author's style is down-to-earth and he makes the material very accessible.
I'd looked at using Visual Studio Code before but could never get into it when I already knew how to work with VS Community. This book takes you step by step through it and I now enjoy working with it.
Mark Price also goes into some of the "gotchas" in the language like the dangers of using the Double type and C#'s use of Banker's rounding. I understand bitwise operations better than I did before. He also points out best practices that come in very handy.
I'm looking forward to finishing the book but I can already say it's an excellent resource.
I will say that some screenshots of the project creation screens would be helpful, instead of just trying to describe it in text, and the text not totally mirroring the fields on the screen.
Desktop apps covered in the bonus pdf that is available for download from GitHub.
Mark Price' presents material in a logical and, usually, easy to follow manner. He covers a breadth of material and consequently can't detail it all, but usually provides pointers to resources for those wanting more. I can't imagine a better resource for someone with a little background but in need of moving beyond brief introductions into the rich world of C# and .Net6. I frequently get excited by the practical way he presents information that I anticipate utilizing on some personal projects. He makes available an excellent errata resource. Two or three times, Mark gave an example which worked well, but I had difficulty grasping why. I suspect that more my learning challenge than his writing. I am more than three quarters of a century old. Still, I'm high on Mark and this book.
Earlier I wrote after working through chapter 3:
I'm comparing this book to two other book purchase on the subject of C#. (I'm trying to teach myself how to program.) The others did a good job introducing various aspects of the language and how to program. I'm now into chapter three of this book and have found a wealth of information easily accessible and retrieval in the future. I've become a fan of Mark Price and his thoroughness. Entering this book I find additional electronic resources that he makes available which add to the richness of volume. I do not see it as an entry book, but at least an intermediate level. I'm loving the learning.
The book oversells its coverage of MAUI. The book admits in the forward that MAUI was not released in time to include in the book but not all of the content in the book was likewise edited. For example, the back cover states "Build cross-platform apps using .NET MAUI and XAML"; not really true with respect to MAUI.
Top reviews from other countries


Im only halfway through but I’d guess that it will give a good idea of what sort of advanced topic you want to study further. It covers a lot of topics but some only briefly.



Mittlerweile habe ich das Buch vollständig gelesen:
* Die ersten 400 Seiten beziehen sich auf Basiswissen von C# und VisualStudio.
Für Einsteiger ist dies super, für Fortgeschrittene jedoch wenig neues.
* Dann folgen rund 100 Seiten sehr hilfreiche und gut komprimierte Infos zum Entity Framework Core und LINQ.
Dies dürfte für alle Leser sehr nützlich sein.
* Auf leider nur 200 Seiten wird auf Blazor (Server & WebAssembly) behandelt.
Blazor war mein Hauptmotivation zum Kauf - leider wird die erhofften Thementiefe nicht erfüllt. Umfangreichere Formularoberflächen werden ebenso vergeblich gesucht, wie Themengebiete zur Authentifizierung.
Zu finden sind aber ein sehr guter Überblick und Einstieg in die Blazorwelt, sowie viele Tipps und Tricks.
Auch die Basis um Frameworks wie Radzen & Co sinnvoll zu nutzen, wird grundsätzlich gelegt.
Von Anfang bis Ende ist ein durchdachter, roter Faden erkennbar.
Die praxisnahmen Beispiele bauen hervorragend aufeinander auf, sind möglichst einfach erklärt und so jederzeit verständlich nachvollziehbar.
Auch sind sowohl das Buch als auch der Code sehr, sehr sorgenfältig korrekturgelesen und durchdacht.
So ist durchgehend zu merken, dass Mark Price die Themen wirklich verstanden und nicht(!) nur mehr oder weniger willkürlich etwas lückenfüllend zusammenkopiert hat.
Ein Kritikpunkt ist, dass nach jedem Kapitel Kontrollfragen gestellt werden, jedoch keine Musterantworten folgen.
Zu Fragen mit Programmieraufgaben, sind jedoch Beispielcode vorhanden.
Insgesamt kann ich dieses leicht verständliche und lehrreiche Buch durchaus empfehlen.