Book Image

C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals - Eighth Edition

By : Mark J. Price
4.7 (13)
Book Image

C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals - Eighth Edition

4.7 (13)
By: Mark J. Price

Overview of this book

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.
Table of Contents (18 chapters)
17
Index

Practicing and exploring

Test your knowledge and understanding by answering some questions, getting some hands-on practice, and exploring this chapter’s topics with deeper research.

Exercise 15.1 – Test your knowledge

Answer the following questions:

  1. What are the four Blazor render modes, and how are they different?
  2. In a Blazor Web App project, compared to an ASP.NET Core MVC project, what extra configuration is required?
  3. Why should you avoid the Blazor Server and Blazor Server Empty project templates?
  4. In a Blazor Web App project, what does the App.razor file do?
  5. What is the main benefit of using the <NavLink> component?
  6. How can you pass a value into a component?
  7. What is the main benefit of using the <EditForm> component?
  8. How can you execute some statements when parameters are set?
  9. How can you execute some statements when a component appears?
  10. One of the benefits of Blazor is being able...