Book Image

Beginning Modern C# and .NET Development

By : Reynald Adolphe
Book Image

Beginning Modern C# and .NET Development

By: Reynald Adolphe

Overview of this book

The course will initially begin with familiarizing you to the different .NET technologies and Visual Studio 2017. Beginning from the basic concepts of declaring and working with variables, we move on to writing code that makes decisions, repeats a block of statements, converts between types, and handles errors. You will also learn about .NET Core and its class library assemblies, and packages of types that are defined in .NET Standard that allow your applications to connect existing components together to perform common practical tasks. You will then learn to make your own types using object-oriented programming (OOP) and learn how to read and write to databases. You will then see what can be achieved with Extensible Application Markup Language (XAML) when defining the user interface for a graphical app, in particular, for Universal Windows Platform (UWP). Finally, we look at building web applications with a modern HTTP architecture on the server side using Microsoft ASP.NET Core MVC. All the resources and support files are available at https://github.com/PacktPublishing/Beginning-Modern-CSharp-and-DotNet-Development---eLearning
Table of Contents (7 chapters)
Chapter 3
Controlling the Flow, Converting Types, and Handling Exceptions
Content Locked
Section 2
Understanding Selection Statements
This video explains how every application needs to be able to select from choices and branch along different code paths. The two selection statements that are available in C# are if and switch. You can use if for all your code but switch can simplify your code in some common scenarios. To understand selection statements effectively, you need to: - Implement a simple if statement - Implement the new pattern matching feature of C# using the if statement - Implement a simple switch statement - Implement pattern matching using a switch statement