Book description
An accessible guide for beginner-to-intermediate programmers to the concepts, real-world applications, and latest features of C# 12 and .NET 8, with hands-on exercises using Visual Studio 2022 and Visual Studio Code. Purchase of the print or Kindle book includes a free PDF eBook
Key Features
- Explore the latest additions to C# 12, the .NET 8 class libraries, and Entity Framework Core 8
- Create professional websites and services with ASP.NET Core 8 and Blazor
- Build your confidence with step-by-step code examples and tips for best practices
Book Description
This latest edition of the bestselling Packt series will give you a solid foundation to start building projects using modern C# and .NET with confidence.
You'll learn about object-oriented programming; writing, testing, and debugging functions; and implementing interfaces. You'll take on .NET APIs for managing and querying data, working with the fi lesystem, and serialization. As you progress, you'll explore examples of cross-platform projects you can build and deploy, such as websites and services using ASP.NET Core.
This latest edition integrates .NET 8 enhancements into its examples: type aliasing and primary constructors for concise and expressive code. You'll handle errors robustly through the new built-in guard clauses and explore a simplified implementation of caching in ASP.NET Core 8.
If that's not enough, you'll also see how native ahead-of-time (AOT) compiler publish lets web services reduce memory use and run faster. You'll work with the seamless new HTTP editor in Visual Studio 2022 to enhance the testing and debugging process. You'll even get introduced to Blazor Full Stack with its new unified hosting model for unparalleled web development flexibility.
What you will learn
- Discover C# 12's new features, including aliasing any type and primary constructors
- Try out the native AOT publish capability for ASP.NET Core 8 Minimal APIs web services
- Build rich web experiences using Blazor Full Stack, Razor Pages, and other ASP.NET Core features
- Integrate and update databases in your apps using Entity Framework Core models
- Query and manipulate data using LINQ
- Build and consume powerful services using Web API and Minimal API
Who this book is for
This book is for beginners as well as intermediate-level C# and .NET programmers who have worked with C# in the past and want to catch up with the changes made in the last few years. Prior exposure to C# or .NET is not a prerequisite. A general understanding of programming will help you to work through the book more comfortably, though the content is suitable for those completely new to programming. If you already have some C# and .NET skills and want to focus on developing practical apps, you can pick up Mark’s other .NET book, Apps and Services with .NET 8, instead.
Table of contents
- Preface
-
Hello, C#! Welcome, .NET!
- Introducing this book and its contents
- Setting up your development environment
- Understanding .NET
- Building console apps using Visual Studio 2022
- Building console apps using Visual Studio Code
- Making good use of the GitHub repository for this book
- Looking for help
- Practicing and exploring
- Summary
- Learn more on Discord
- 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
- Setting up a class library and console application
- Static methods and overloading operators
- Making types safely reusable with generics
- Raising and handling events
- Implementing interfaces
- Managing memory with reference and value types
- Working with null values
- Inheriting from classes
- Casting within inheritance hierarchies
- Inheriting and extending .NET types
- Summarizing custom type choices
- Practicing and exploring
- Summary
- 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
- Introducing Web Development Using ASP.NET Core
- Building Websites Using ASP.NET Core Razor Pages
- Building and Consuming Web Services
- Building User Interfaces Using Blazor
- Epilogue
- Index
Product information
- Title: C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals - Eighth Edition
- Author(s):
- Release date: November 2023
- Publisher(s): Packt Publishing
- ISBN: 9781837635870
You might also like
book
Software Architecture with C# 12 and .NET 8 - Fourth Edition
A book for the aspiring .NET software architect – design scalable and high-performance enterprise solutions using …
book
C# 10 and .NET 6 – Modern Cross-Platform Development - Sixth Edition
Publisher’s Note: Microsoft will stop supporting .NET 6 from November 2024. The newer 8th edition of …
book
C# 11 and .NET 7 – Modern Cross-Platform Development Fundamentals - Seventh Edition
Publisher’s Note: Microsoft will stop supporting .NET 7 from May 2024. The newer 8th edition of …
video
C# Basics For Absolute Beginners in C# and .NET
Do you want to understand C# development environments and C# coding concepts such as variables, operators, …