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)

Chapter 01

Hello, C#! Welcome, .NET!

In this first chapter, the goals are setting up your development environment, understanding the similarities and differences between .NET Core, .NET Framework, and .NET Standard, and then creating the simplest application possible with C# and .NET Core using Microsoft's Visual Studio Code.

After this first chapter, this book can be divided into three parts: first, the grammar and vocabulary of the C# language; second, the types available in .NET Core for building app features; and third, examples of common cross-platform apps you can build using C# and .NET. The last two chapters are about two types of application that can be built with C# but the first is not cross-platform and the second does not use .NET Core yet so they should be considered bonus chapters.

Most people learn complex topics best by imitation and repetition rather than reading a detailed explanation of the theory; therefore I will not overload you with detailed explanations of every step throughout this book. The idea is to get you to write some code, build an application from that code, and then for you to see it run.

You don't need to know all the nitty-gritty details immediately. That will be something that comes with time as you build your own apps and go beyond what any book can teach you.

In the words of Samuel Johnson, author of the English dictionary in 1755, I have committed "a few wild blunders, and risible absurdities, from which no work of such multiplicity is free." I take sole responsibility for these and hope you appreciate the challenge of my attempt to lash the wind by writing this book about rapidly evolving technologies like C# and .NET Core, and the apps that you can build with them.

This first chapter covers the following topics:

  • Setting up your development environment
  • Understanding .NET
  • Building console apps using Visual Studio Code
  • Downloading solution code from a GitHub repository
  • Looking for help