Book Image

C# 10 and .NET 6 – Modern Cross-Platform Development - Sixth Edition

By : Mark J. Price
5 (1)
Book Image

C# 10 and .NET 6 – Modern Cross-Platform Development - Sixth Edition

5 (1)
By: Mark J. Price

Overview of this book

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

Practicing and exploring

Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore this chapter's topics with deeper research.

Exercise 12.1 – Test your knowledge

Answer the following questions:

  1. What information can you find out about a process?
  2. How accurate is the Stopwatch class?
  3. By convention, what suffix should be applied to a method that returns Task or Task<T>?
  4. To use the await keyword inside a method, what keyword must be applied to the method declaration?
  5. How do you create a child task?
  6. Why should you avoid the lock keyword?
  7. When should you use the Interlocked class?
  8. When should you use the Mutex class instead of the Monitor class?
  9. What is the benefit of using async and await in a website or web service?
  10. Can you cancel a task? If so, how?

Exercise 12.2 – Explore topics

Use the links on the following webpage to learn...