Book Image

C# 7 and .NET: Designing Modern Cross-platform Applications

By : Mark J. Price, Ovais Mehboob Ahmed Khan
Book Image

C# 7 and .NET: Designing Modern Cross-platform Applications

By: Mark J. Price, Ovais Mehboob Ahmed Khan

Overview of this book

C# is a widely used programming language, thanks to its easy learning curve, versatility, and support for modern paradigms. The language is used to create desktop apps, background services, web apps, and mobile apps. .NET Core is open source and compatible with Mac OS and Linux. There is no limit to what you can achieve with C# and .NET Core. This Learning Path begins with the basics of C# and object-oriented programming (OOP) and explores features of C#, such as tuples, pattern matching, and out variables. You will understand.NET Standard 2.0 class libraries and ASP.NET Core 2.0, and create professional websites, services, and applications. You will become familiar with mobile app development using Xamarin.Forms and learn to develop high-performing applications by writing optimized code with various profiling techniques. By the end of C# 7 and .NET: Designing Modern Cross-platform Applications, you will have all the knowledge required to build modern, cross-platform apps using C# and .NET. This Learning Path includes content from the following Packt products: • C# 7.1 and .NET Core 2.0 - Modern Cross-Platform Development - Third Edition by Mark J. Price • C# 7 and .NET Core 2.0 High Performance by Ovais Mehboob Ahmed Khan
Table of Contents (25 chapters)
Title Page
Copyright
About Packt
Contributors
Preface
16
Designing Guidelines for .NET Core Application Performance
Index

Building mobile apps using Xamarin.Forms


We will build a mobile app that runs on either iOS or Android for managing customers in Northwind.

Note

If you have never run Xcode, run it now to ensure that all its required components are installed and registered.

Adding Android SDKs

To target Android, you must install at least one Android SDK. A default installation of Visual Studio for Mac already includes one Android SDK, but it is often an older version to support as many Android devices as possible. To use the latest features of Xamarin.Forms, you must install a more recent Android SDK.

Start Visual Studio for Mac, and navigate to Visual Studio Community | Preferences.

In Preferences, navigate to Projects | SDK Locations, and select the Platforms you want, for example, Android 8.0 - Oreo, as shown in the following screenshot:

Note

When installing an Android SDK, you must select at least one System Image to use as a virtual machine emulator for testing.

Creating a Xamarin.Forms solution

Navigate toFile...