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 with deeper research into this chapter's topics.

Exercise 3.1 – Test your knowledge

Answer the following questions:

  1. What happens when you divide an int variable by 0?
  2. What happens when you divide a double variable by 0?
  3. What happens when you overflow an int variable, that is, set it to a value beyond its range?
  4. What is the difference between x = y++; and x = ++y;?
  5. What is the difference between break, continue, and return when used inside a loop statement?
  6. What are the three parts of a for statement and which of them are required?
  7. What is the difference between the = and == operators?
  8. Does the following statement compile?
    for ( ; true; ) ;
    
  9. What does the underscore _ represent in a switch expression?
  10. What interface must an object implement to be enumerated...