C# 7 and .NET Core 2.0 High Performance Build highly performant, multi-threaded, and concurrent applications using C# 7 and .NET Core 2.0 Ovais Mehboob Ahmed Khan BIRMINGHAM - MUMBAI C# 7 and .NET Core 2.0 High Performance Copyright © 2018 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. Commissioning Editor: Merint Mathew Acquisition Editor: Chaitanya Nair Content Development Editor: Anugraha Arunagiri Technical Editor: Jijo Maliyekal Copy Editor: Safis Editing Project Coordinator: Ulhas Kambali Proofreader: Safis Editing Indexer: Tejal Daruwale Soni Graphics: Tania Dutta Production Coordinator: Deepika Naik First published: April 2018 Production reference: 1240418 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78847-004-9 www.packtpub.com mapt.io Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website. Why subscribe? Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals Improve your learning with Skill Plans built especially for you Get a free eBook or video every month Mapt is fully searchable Copy and paste, print, and bookmark content PacktPub.com Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at and as www.PacktPub.com a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details. [email protected] At , you can also read a collection of free technical articles, sign up for a www.PacktPub.com range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks. Contributors About the author Ovais Mehboob Ahmed Khan is a seasoned programmer and solution architect with over 14 years of software development experience. He has worked in organizations across Pakistan, the USA, and the Middle East. Currently, he is working for a government entity based in Dubai. A Microsoft MVP, he specializes mainly in Microsoft .NET, the cloud and web development. He has published technical articles on MSDN, TechNet, personal blog, and he has authored two other books published by Packt: JavaScript for .NET Developers and Enterprise Application Architecture with .NET Core. I would like to thank my family for supporting me, especially my mother, wife, and brother, who have always encouraged me in every goal of my life. My father, may he rest in peace, would have been proud of my achievements. About the reviewer Jalpesh Vadgama has been working on technologies like .NET such as MVC, ASP.NET Core, Web Forms, and REST APIs for over 14 years now. Experienced in open source server-side technologies such as Node.js, he has worked with frameworks such as jQuery, Knockout.js, Angular, React.js and Vue. He has been awarded the Microsoft MVP award six times for his technical contribution to .NET and has delivered over 50 Enterprise-level applications using .NET technologies. He has also been using software development methodologies such as Agile, Scrum, and Waterfall for quite a while. I would like to thank my wife and family for their support.