The professional’s guide to C# 7, with expert guidance on the newest features
Professional C# 7 and .NET Core 2.0 provides experienced programmers with the information they need to work effectively with the world’s leading programming language. The latest C# update added many new features that help you get more done in less time, and this book is your ideal guide for getting up to speed quickly. C# 7 focuses on data consumption, code simplification, and performance, with new support for local functions, tuple types, record types, pattern matching, non-nullable reference types, immutable types, and better support for variables. Improvements to Visual Studio will bring significant changes to the way C# developers interact with the space, bringing .NET to non-Microsoft platforms and incorporating tools from other platforms like Docker, Gulp, and NPM. Guided by a leading .NET expert and steeped in real-world practicality, this guide is designed to get you up to date and back to work.
With Microsoft speeding up its release cadence while offering more significant improvement with each update, it has never been more important to get a handle on new tools and features quickly. This book is designed to do just that, and more–everything you need to know about C# is right here, in the single-volume resource on every developer’s shelf.
* Tour the many new and enhanced features packed into C# 7 and .NET Core 2.0
* Learn how the latest Visual Studio update makes developers’ jobs easier
* Streamline your workflow with a new focus on code simplification and performance enhancement
* Delve into improvements made for localization, networking, diagnostics, deployments, and more
Whether you’re entirely new to C# or just transitioning to C# 7, having a solid grasp of the latest features allows you to exploit the language’s full functionality to create robust, high -quality apps. Professional C# 7 and .NET Core 2.0 is the one-stop guide to everything you need to know.
Зміст
INTRODUCTION liii
PART I: THE C# LANGUAGE
CHAPTER 1: .NET APPLICATIONS AND TOOLS 3
CHAPTER 2: CORE C# 37
CHAPTER 3: OBJECTS AND TYPES 75
CHAPTER 4: OBJECT-ORIENTED PROGRAMMING WITH C# 109
CHAPTER 5: GENERICS 129
CHAPTER 6: OPERATORS AND CASTS 151
CHAPTER 7: ARRAYS 193
CHAPTER 8: DELEGATES, LAMBDAS, AND EVENTS 215
CHAPTER 9: STRINGS AND REGULAR EXPRESSIONS 235
CHAPTER 10: COLLECTIONS 255
CHAPTER 11: SPECIAL COLLECTIONS 287
CHAPTER 12: LANGUAGE INTEGRATED QUERY 305
CHAPTER 13: FUNCTIONAL PROGRAMMING
CHAPTER 14: ERRORS AND EXCEPTIONS 367
CHAPTER 15: ASYNCHRONOUS PROGRAMMING 391
CHAPTER 16: REFLECTION, METADATA, AND DYNAMIC
CHAPTER 17: MANAGED AND UNMANAGED MEMORY 439
CHAPTER 18: VISUAL STUDIO 2017 479
PART II: .NET CORE AND THE WINDOWS RUNTIME
CHAPTER 19: LIBRARIES, ASSEMBLIES, PACKAGES, AND NUGET 539
CHAPTER 20: DEPENDENCY INJECTION 559
CHAPTER 21: TASKS AND PARALLEL PROGRAMMING 583
CHAPTER 22: FILES AND STREAMS 631
CHAPTER 23: NETWORKING 669
CHAPTER 24: SECURITY 713
CHAPTER 25: ADO.NET AND TRANSACTIONS 741
CHAPTER 26: ENTITY FRAMEWORK CORE 769
CHAPTER 27: LOCALIZATION 831
CHAPTER 28: TESTING 863
CHAPTER 29: TRACING, LOGGING, AND ANALYTICS 895
PART III: WEB APPLICATIONS AND SERVICES
CHAPTER 30: ASP.NET CORE 923
CHAPTER 31: ASP.NET CORE MVC 963
CHAPTER 32: WEB API 1039
PART IV: APPS
CHAPTER 33: WINDOWS APPS 1083
CHAPTER 34: PATTERNS WITH XAML APPS 1157
CHAPTER 35: STYLING WINDOWS APPS 1195
CHAPTER 37: XAMARIN.FORMS 1291
INDEX 1327
ONLINE CHAPTERS
BONUS CHAPTER 1: COMPOSITION OC1
BONUS CHAPTER 2: XML AND JSON OC33
BONUS CHAPTER 3: WEBHOOKS AND SIGNALR OC71
BONUS CHAPTER 5: MORE WINDOWS APPS FEATURES OC123
Про автора
About the author
Christian Nagel is a Microsoft MVP for Visual Studio and Development Technologies, software architect, and veteran developer who has been building solutions with .NET technologies since 2000. He has authored many acclaimed .NET books, and he also speaks at such international conferences as Ignite (formerly Tech Ed) and Tech Days. A supporter of .NET user groups, Christian is a Microsoft Certified Trainer and Professional Developer for Universal Windows apps, ASP.NET Core, and Microsoft Azure.
Visit us at wrox.com for free code samples.