C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition

Modern Cross-Platform Development
Preview in Mapt

C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition

Mark J. Price

Modern Cross-Platform Development
Mapt Subscription
FREE
$29.99/m after trial
eBook
$28.00
RRP $39.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$28.00
$49.99
$29.99p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition Book Cover
C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition
$ 39.99
$ 28.00
C# 7.1 and .NET Core 2.0 – Modern Cross-Platform Development - Third Edition Book Cover
C# 7.1 and .NET Core 2.0 – Modern Cross-Platform Development - Third Edition
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $44.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781787129559
Paperback594 pages

Book Description

If you want to build powerful cross-platform applications with C# 7 and .NET Core, then this book is for you.

First, we'll run you through the basics of C#, as well as object-oriented programming, before taking a quick tour through the latest features of C# 7 such as tuples, pattern matching, out variables, and so on.

After quickly taking you through C# and how .NET works, we'll dive into the .NET Standard 1.6 class libraries, covering topics such as performance, monitoring, debugging, serialization and encryption.

The final section will demonstrate the major types of application that you can build and deploy cross-device and cross-platform. In this section, we’ll cover Universal Windows Platform (UWP) apps, web applications, mobile apps, and web services. Lastly, we’ll look at how you can package and deploy your applications so that they can be hosted on all of today’s most popular platforms, including Linux and Docker.

By the end of the book, you'll be armed with all the knowledge you need to build modern, cross-platform applications using C# and .NET Core.

Table of Contents

Chapter 1: Hello, C#! Welcome, .NET Core!
Choosing your development environment
Installing Microsoft Visual Studio 2017 for Windows
Installing Microsoft Visual Studio Code for Windows, macOS, or Linux
Understanding .NET
Writing and compiling code using the .NET Core CLI tool
Writing and compiling code using Microsoft Visual Studio 2017
Writing and compiling code using Microsoft Visual Studio Code
Managing source code with GitHub
Practicing and exploring
Summary
Chapter 2: Speaking C#
Understanding C# basics
Declaring variables
Building console applications
Operating on variables
Practicing and exploring
Summary
Chapter 3: Controlling the Flow, Converting Types, and Handling Exceptions
Selection statements
Iteration statements
Casting and converting between types
Handling exceptions
Checking for overflow
Looking for help
Practice and explore
Summary
Chapter 4: Using .NET Standard Types
Using assemblies and namespaces
Storing and manipulating text
Storing data with collections
Internationalizing an application
Practicing and exploring
Summary
Chapter 5: Debugging, Monitoring, and Testing
Debugging tools
Monitoring performance and resource usage
Unit testing an application
Practicing and exploring
Summary
Chapter 6: Building Your Own Types with Object-Oriented Programming
Talking about OOP
Building class libraries
Storing data with fields
Writing and calling methods
Controlling how parameters are passed
Splitting classes using partial
Controlling access with properties and indexers
Practicing and exploring
Summary
Chapter 7: Implementing Interfaces and Inheriting Classes
Setting up a class library and console application
Simplifying methods with operators
Defining local functions
Raising and handling events
Implementing interfaces
Managing memory with reference and value types
Inheriting from classes
Casting within inheritance hierarchies
Inheriting and extending .NET types
Practice and explore
Summary
Chapter 8: Working with Databases Using the Entity Framework Core
Relational Database Management Systems
Using Microsoft SQL Server on Windows
Using SQLite on macOS and mobile platforms
Connecting to the database
Setting up Entity Framework Core
Querying an EF Core model
Manipulating data with EF Core
Practicing and exploring
Summary
Chapter 9: Querying and Manipulating Data with LINQ
Writing LINQ queries
Working with sets
Projecting entities with Select
Sweetening the syntax with syntactic sugar
Using multiple threads with parallel LINQ
Creating your own LINQ extension methods
Working with LINQ to XML
Practicing and exploring
Summary
Chapter 10: Working with Files, Streams, and Serialization
Managing the filesystem
Reading and writing with streams
Encoding text
Serializing object graphs
Practice and explore
Summary
Chapter 11: Protecting Your Data
Understanding the vocabulary of protection
Encrypting and decrypting data
Hashing data
Signing data
Practicing and exploring
Summary
Chapter 12: Improving Performance and Scalability with Multitasking
Understanding processes, threads, and tasks
Running tasks asynchronously
Synchronizing access to shared resources
Implementing multitasking for a GUI
Practicing and exploring
Summary
Chapter 13: Building Universal Windows Platform Apps Using XAML
Understanding Universal Windows Platform
Understanding XAML
Creating an app for Universal Windows Platform
Using resources and templates
Data binding
Animating with storyboards
Testing in emulators
Practicing and exploring
Summary
Chapter 14: Building Web Applications Using ASP.NET Core MVC
Understanding ASP.NET Core
Exploring an ASP.NET Core MVC web application
ASP.NET Core MVC controllers
ASP.NET Core MVC models
ASP.NET Core MVC views
Taking ASP.NET Core MVC further
Practicing and exploring
Summary
Chapter 15: Building Mobile Apps Using Xamarin.Forms and ASP.NET Core Web API
Understanding Xamarin.Forms
Building services using ASP.NET Core Web API and Visual Studio Code
Building mobile apps using Xamarin.Forms and Visual Studio for Mac
Practicing and exploring
Summary
Chapter 16: Packaging and Deploying Your Code Cross-Platform
Porting to .NET Core
Sharing code cross-platform with .NET Standard class libraries
Understanding NuGet packages
Publishing your applications
Deploying to the cloud
Developing on and for Linux
Practicing and exploring
Summary

What You Will Learn

  • Build cross-platform applications using C# 7 and .NET Core
  • Explore ASP.NET Core and learn how to create professional web applications
  • Improve your application's performance using multitasking
  • Use Entity Framework Core and find out how to build code-first databases
  • Master object-oriented programming with C# to increase code reuse and efficiency
  • Familiarize yourself with cross-device app development using the Universal Windows Platform and XAML
  • Query and manipulate data using LINQ
  • Protect your data by using encryption and hashing

Authors

Table of Contents

Chapter 1: Hello, C#! Welcome, .NET Core!
Choosing your development environment
Installing Microsoft Visual Studio 2017 for Windows
Installing Microsoft Visual Studio Code for Windows, macOS, or Linux
Understanding .NET
Writing and compiling code using the .NET Core CLI tool
Writing and compiling code using Microsoft Visual Studio 2017
Writing and compiling code using Microsoft Visual Studio Code
Managing source code with GitHub
Practicing and exploring
Summary
Chapter 2: Speaking C#
Understanding C# basics
Declaring variables
Building console applications
Operating on variables
Practicing and exploring
Summary
Chapter 3: Controlling the Flow, Converting Types, and Handling Exceptions
Selection statements
Iteration statements
Casting and converting between types
Handling exceptions
Checking for overflow
Looking for help
Practice and explore
Summary
Chapter 4: Using .NET Standard Types
Using assemblies and namespaces
Storing and manipulating text
Storing data with collections
Internationalizing an application
Practicing and exploring
Summary
Chapter 5: Debugging, Monitoring, and Testing
Debugging tools
Monitoring performance and resource usage
Unit testing an application
Practicing and exploring
Summary
Chapter 6: Building Your Own Types with Object-Oriented Programming
Talking about OOP
Building class libraries
Storing data with fields
Writing and calling methods
Controlling how parameters are passed
Splitting classes using partial
Controlling access with properties and indexers
Practicing and exploring
Summary
Chapter 7: Implementing Interfaces and Inheriting Classes
Setting up a class library and console application
Simplifying methods with operators
Defining local functions
Raising and handling events
Implementing interfaces
Managing memory with reference and value types
Inheriting from classes
Casting within inheritance hierarchies
Inheriting and extending .NET types
Practice and explore
Summary
Chapter 8: Working with Databases Using the Entity Framework Core
Relational Database Management Systems
Using Microsoft SQL Server on Windows
Using SQLite on macOS and mobile platforms
Connecting to the database
Setting up Entity Framework Core
Querying an EF Core model
Manipulating data with EF Core
Practicing and exploring
Summary
Chapter 9: Querying and Manipulating Data with LINQ
Writing LINQ queries
Working with sets
Projecting entities with Select
Sweetening the syntax with syntactic sugar
Using multiple threads with parallel LINQ
Creating your own LINQ extension methods
Working with LINQ to XML
Practicing and exploring
Summary
Chapter 10: Working with Files, Streams, and Serialization
Managing the filesystem
Reading and writing with streams
Encoding text
Serializing object graphs
Practice and explore
Summary
Chapter 11: Protecting Your Data
Understanding the vocabulary of protection
Encrypting and decrypting data
Hashing data
Signing data
Practicing and exploring
Summary
Chapter 12: Improving Performance and Scalability with Multitasking
Understanding processes, threads, and tasks
Running tasks asynchronously
Synchronizing access to shared resources
Implementing multitasking for a GUI
Practicing and exploring
Summary
Chapter 13: Building Universal Windows Platform Apps Using XAML
Understanding Universal Windows Platform
Understanding XAML
Creating an app for Universal Windows Platform
Using resources and templates
Data binding
Animating with storyboards
Testing in emulators
Practicing and exploring
Summary
Chapter 14: Building Web Applications Using ASP.NET Core MVC
Understanding ASP.NET Core
Exploring an ASP.NET Core MVC web application
ASP.NET Core MVC controllers
ASP.NET Core MVC models
ASP.NET Core MVC views
Taking ASP.NET Core MVC further
Practicing and exploring
Summary
Chapter 15: Building Mobile Apps Using Xamarin.Forms and ASP.NET Core Web API
Understanding Xamarin.Forms
Building services using ASP.NET Core Web API and Visual Studio Code
Building mobile apps using Xamarin.Forms and Visual Studio for Mac
Practicing and exploring
Summary
Chapter 16: Packaging and Deploying Your Code Cross-Platform
Porting to .NET Core
Sharing code cross-platform with .NET Standard class libraries
Understanding NuGet packages
Publishing your applications
Deploying to the cloud
Developing on and for Linux
Practicing and exploring
Summary

Book Details

ISBN 139781787129559
Paperback594 pages
Read More

Read More Reviews

Recommended for You

C# 6 and .NET Core 1.0: Modern Cross-Platform Development Book Cover
C# 6 and .NET Core 1.0: Modern Cross-Platform Development
$ 39.99
$ 28.00
ASP.NET Core and Angular 2 Book Cover
ASP.NET Core and Angular 2
$ 35.99
$ 25.20
Mastering C# and .NET Framework Book Cover
Mastering C# and .NET Framework
$ 35.99
$ 25.20
Angular 2 By Example Book Cover
Angular 2 By Example
$ 35.99
$ 25.20
Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Mastering Bootstrap 4 Book Cover
Mastering Bootstrap 4
$ 35.99
$ 25.20