Book description
Quick solutions to common programming problems with the latest features of C# 7.0, .NET Core 1.1, and Visual Studio 2017
About This Book
Easy-to-follow recipes to get you up-and-running with the new features of C# 7 and .NET Core 1.1
Practical solutions to assist you with microservices and serverless computing in C#
Explore the new Visual Studio environment and write more secure code in it
Who This Book Is For
The book will appeal to C# and .NET developers who have a basic familiarity with C# and the Visual Studio 2015 environment
What You Will Learn
Writing better and less code to achieve the same result as in previous versions of C#
Working with analyzers in Visual Studio
Working with files, streams, and serialization
Writing high-performant code in C# and understanding multi-threading
Demystifying the Rx library using Reactive extensions
Exploring .Net Core 1.1 and ASP.NET MVC
Securing your applications and learning new debugging techniques
Designing and building a microservice architecture
Using Azure and AWS for serverless computing with C#
In Detail
C# has recently been open-sourced and C# 7 comes with a host of new features for building powerful, cross-platform applications.
This book will be your solution to some common programming problems that you come across with C# and will also help you get started with .NET Core 1.1. Through a recipe-based approach, this book will help you overcome common programming challenges and get your applications ready to face the modern world.
We start by running you through new features in C# 7, such as tuples, pattern matching, and so on, giving you hands-on experience with them. Moving forward, you will work with generics and the OOP features in C#. You will then move on to more advanced topics, such as reactive extensions, Regex, code analyzers, and asynchronous programming. This book will also cover new, cross-platform .NET Core 1.1 features and teach you how to utilize .NET Core on macOS. Then, we will explore microservices as well as serverless computing and how these benefit modern developers. Finally, you will learn what you can do with Visual Studio 2017 to put mobile application development across multiple platforms within the reach of any developer.
Style and approach
A unique recipe-based guide that will help you gain a solid understanding of the new concepts in C# 7.0 and Visual Studio 2017
Table of contents
- Preface
-
New Features in C# 7.0
- Introduction
- Working with Tuples - getting started
- Working with Tuples - going deeper
- Pattern matching
- Out variables
- Deconstruction
- Local functions
- Improvements to literals
- Ref returns and locals
- Generalized async return types
- Expression bodies for accessors, constructors, and finalizers
- throw expressions
- Classes and Generics
- Object-Oriented Programming in C#
- Code Analyzers in Visual Studio
- Regular Expressions
- Working with Files, Streams, and Serialization
- Making Apps Responsive with Asynchronous Programming
-
High Performance Programming Using Parallel and Multithreading in C#
- Introduction
- Creating and aborting a low-priority background thread
- Increasing the maximum thread pool size
- Creating multiple threads
- Locking one thread until the contended resources are available
- Invoking parallel calls to methods using Parallel.Invoke
- Using a parallel foreach loop
- Cancelling a parallel foreach loop
- Catching errors in parallel foreach loops
- Debugging multiple threads
- Composing Event-Based Programs Using Reactive Extensions
- Exploring .NET Core 1.1
- ASP.NET Core on the MVC Framework
- Choosing and Using a Source Control Strategy
- Creating a Mobile Application in Visual Studio
-
Writing Secure Code and Debugging in Visual Studio
- Introduction
- Encrypting and storing passwords correctly
- Using SecureString in code
- Securing sensitive parts of the App.config/web.config
- Preventing SQL injection attacks
- Using IntelliTrace, diagnostic tools, and historical debugging
- Setting conditional breakpoints
- Using PerfTips to identify bottlenecks in code
- Creating Microservices on Azure Service Fabric
- Azure and Serverless Computing
Product information
- Title: C# 7 and .NET Core Cookbook
- Author(s):
- Release date: April 2017
- Publisher(s): Packt Publishing
- ISBN: 9781787286276
You might also like
book
C# 7 and .NET Core 2.0 High Performance
Improve the speed of your code and optimize the performance of your apps About This Book …
book
Professional C# 7 and .NET Core 2.0, 7th Edition
The professional’s guide to C# 7, with expert guidance on the newest features Professional C# 7 …
book
Core C# and .NET
Written for C# 2.0 and .NET 2.0: contains coverage of generics, Master Pages, the DataGridView, and …
book
C# 4.0 Unleashed
C# 4.0 Unleashed is a practical reference focusing on the C# language and the .NET platform …