Book Image

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development - Fourth Edition

By : Mark J. Price
Book Image

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development - Fourth Edition

By: Mark J. Price

Overview of this book

In C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development, Fourth Edition, expert teacher Mark J. Price gives you everything you need to start programming C# applications. This latest edition uses the popular Visual Studio Code editor to work across all major operating systems. It is fully updated and expanded with new chapters on Content Management Systems (CMS) and machine learning with ML.NET. The book covers all the topics you need. Part 1 teaches the fundamentals of C#, including object-oriented programming, and new C# 8.0 features such as nullable reference types, simplified switch pattern matching, and default interface methods. Part 2 covers the .NET Standard APIs, such as managing and querying data, monitoring and improving performance, working with the filesystem, async streams, serialization, and encryption. Part 3 provides examples of cross-platform applications you can build and deploy, such as web apps using ASP.NET Core or mobile apps using Xamarin.Forms. The book introduces three technologies for building Windows desktop applications including Windows Forms, Windows Presentation Foundation (WPF), and Universal Windows Platform (UWP) apps, as well as web applications, web services, and mobile apps.
Table of Contents (21 chapters)

Practicing and exploring

Let's now test your knowledge and understanding by trying to answer some questions, getting some hands-on practice, and exploring with deeper research into the topics covered throughout this chapter.

Exercise 1.1 – Test your knowledge

Try to answer the following questions, remembering that although most answers can be found in this chapter, some online research or code writing will be needed to answer others:

  1. Why can a programmer use different languages, for example, C# and F#, to write applications that run on .NET Core?
  2. What do you type at the prompt to create a console app?
  3. What do you type at the prompt to build and execute C# source code?
  4. What is the Visual Studio Code keyboard shortcut to view Terminal?
  5. Is Visual Studio 2019 better than Visual Studio Code?
  6. Is .NET Core better than .NET Framework?
  7. What is .NET Standard and why is it important?
  8. What is the name of the entry point method of a .NET console application and how should it be declared?
  9. Where would you look for help about a C# keyword?
  10. Where would you look for solutions to common programming problems?

Exercise 1.2 – Practice C# anywhere

You don't need Visual Studio Code, or even Visual Studio 2019 or Visual Studio 2019 for Mac to write C#. You can go to .NET Fiddle - https://dotnetfiddle.net/ - and start coding online.

Microsoft is also working on an online version of Visual Studio Code that can run in any browser but currently it is only available in private preview. Eventually, it will be accessible to everyone at the following link: https://online.visualstudio.com/

Exercise 1.3 – Explore topics

You can use the following links to read more details about the topics we've covered in this chapter: