Book description
Quick fixes to your common C# programming problems, with a focus on C# 6.0
About This Book
- Unique recipes for C#, that places it in its real-world context.
- You will be able to get yourself out of any coding-corner youve backed yourself into.
- All code samples available through GitHub to bring C#.
- In line with modern development workflows, written to the latest specification of C# 6.0.
Who This Book Is For
The book is aimed at developers who have basic familiarity with C# programming and will know the VS 2015 environment.
What You Will Learn
- Write better and less code to achieve the same result as in previous versions of C#.
- Generate tests from the Code Contracts for mission critical methods.
- Integrate code in Visual Studio with GitHub.
- Create a web application in Azure.
- Design and build a microservice architecture
- Demystify the Rx library using Reactive extensions
- Write high performing codes in C# and understanding multi-threading.
- Security and Debugging.
- Implement Code Contracts on code in Visual Studio.
In Detail
During your application development workflow, there is always a moment when you need to get out of a tight spot. Through a recipe-based approach, this book will help you overcome common programming problems and get your applications ready to face the modern world.
We start with C# 6, giving you hands-on experience with the new language features. Next, we work through the tasks that you perform on a daily basis such as working with strings, generics, and lots more. Gradually, we move on to more advanced topics such as the concept of object-oriented programming, asynchronous programming, reactive extensions, and code contracts.
You will learn responsive high performance programming in C# and how to create applications with Azure. Next, we will review the choices available when choosing a source control solution. At the end of the book, we will show you how to create secure and robust code, and will help you ramp up your skills when using the new version of C# 6 and Visual Studio
Style and Approach
Unique recipe-based guide that will help you gain a solid understanding of the new concepts in C# 6 and Visual Studio Enterprise 2015 in a concise and technically correct manner.
Table of contents
-
C# Programming Cookbook
- Table of Contents
- C# Programming Cookbook
- Credits
- About the Author
- Acknowledgements
- About the Reviewer
- www.PacktPub.com
- Preface
-
1. New Features in C# 6.0
- Introduction
- Creating your Visual Studio project
- String interpolation
- Null-conditional operator
- Initializers for auto-implemented properties and getter-only auto properties
- Index initializers
- The nameof expressions
- Expression-bodied functions and properties
- Using static
- Exception filters
- Using await operator in catch and finally blocks
- 2. Classes and Generics
- 3. Object-Oriented Programming in C#
- 4. Composing Event-Based Programs Using Reactive Extensions
- 5. Create Microservices on Azure Service Fabric
- 6. Making Apps Responsive with Asynchronous Programming
-
7. High Performance Programming Using Parallel and Multithreading in C#
- Introduction
- Creating and aborting a low-priority background thread
- Increasing 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 to run multiple threads
- Cancelling a parallel foreach loop
- Catching errors in parallel foreach loops
- Debugging multiple threads
-
8. Code Contracts
- Introduction
- Downloading, installing, and integrating code contracts into Visual Studio
- Creating code contract preconditions
- Creating code contract postconditions
- Creating code contract invariant
- Creating code contract Assert and Assume methods
- Creating code contract ForAll method
- Creating code contract ValueAtReturn method
- Creating code contract Result method
- Using code contracts on abstract classes
- Using contract abbreviator methods
- Creating tests using IntelliTest
- Using code contracts in extension methods
- 9. Regular Expressions
-
10. Choosing and Using a Source Control Strategy
- Introduction
- Setting up Visual Studio account management and determining which source control solution is best for you
- Setting up Visual Studio GitHub integration, checking in code for the first time, and checking in changes
- Working as a team using GitHub, and handling and resolving conflicts in code
- 11. Creating a Mobile Application in Visual Studio
- 12. Writing Secure Code and Debugging in Visual Studio
- 13. Creating a Web Application in Azure
- Index
Product information
- Title: C# Programming Cookbook
- Author(s):
- Release date: July 2016
- Publisher(s): Packt Publishing
- ISBN: 9781786467300
You might also like
book
C# Programming for Absolute Beginners
Get started using the C# programming language. Based on the author’s 15 years of experience teaching …
book
C# Cookbook
Easy to learn and use, the C# language is targeted at developers for Microsoft's .NET platform …
book
C# Cookbook
Even if you're familiar with C# syntax, knowing how to combine various language features is a …
book
C# 6.0 Cookbook, 4th Edition
Completely updated for C# 6.0, the new edition of this bestseller offers more than 150 code …