Planned Revisions for the 9th edition: Microsoft Visual C# Step By Step, Ninth Edition Revision Plan The previous edition of this book was based on Windows 10 and Visual Studio 2015. Although Windows 10 has only been the subject of incremental updates since then, Visual Studio 2017 has been modified significantly in some areas. The C# language itself has also been enhanced. Specifically, C# 7 has introduced the following features: * You can declare out variables inline within a function call (such as TryParse) rather than having to declare them separately. * You can create Tuple variables that contain more than one public field, * ref functions can return references to locally defined variables (no longer need to use unsafe code and a C# pointer), * You can define functions locally, nested within the scope of other functions, * The syntax for specifying numeric literals has been extended, * You can use is and switch expressions to examine the type of an object as well as its value, * You can apply expression-bodied members (=>) for constructors, finalizers, and get and set accessors on properties and indexers, * The throw statement has been changed to an expression, which enables you to use it in other expressions (previously, you would have to write explicit if . throw constructs) * The async return types have been extended to include the ValueTask type. You can use this feature to optimize some cases where a Task object had been used previously. The existing material that describes the C# language prior to V7 is still valid, so it is proposed to leave much of this content untouched.
The following list summarizes the anticipated chapter by chapter amendments for the ninth edition: * All chapters. o Change references to the .NET Framework to reference the latest version (currently 4.6.1) o Change all references to Visual Studio 2015 to Visual Studio 2017. o Change all screenshots to Visual Studio 2017. o Provide new starter code and solutions for all projects. * Chapter 1.
The focus of most of the book is UWP applications. However, this chapter will have a brief section at the end summarizing the other common options and project types for building C# applications - Windows Classic Desktop, and .NET Core. * Chapter 2. A new section, "Numeric literals" will be added after the section "Declaring variables" on page 37. This short section will illustrate the new syntax available for specifying numeric literal values. * Chapter 3. The section "Applying Scope" will be extended to include nested functions.
This chapter will also be extended to include information on using Tuples and how to use them to return multiple values from a function. * Chapter 4. This chapter will be extended to show how to use the is and switch constructs to detect the type of a variable as well as its value. * Chapter 5. Global changes as described for "All chapters" earlier. * Chapter 6. This chapter will be updated to describe the throw construct as an expression rather than a statement, and provide additional examples of how to use throw in the context of an expression. * Chapter 7.
Global changes as described for "All chapters" earlier. * Chapter 8. This chapter will be updated to show how to return reference values (refs to local variables). The section "Pointers and unsafe code" will be changed to explain how to use returned references rather than pointer types. * Chapter 9. Global changes as described for "All chapters" earlier. * Chapter 10. Global changes as described for "All chapters" earlier.
* Chapter 11. Global changes as described for "All chapters" earlier. * Chapter 12. Global changes as described for "All chapters" earlier. * Chapter 13. Global changes as described for "All chapters" earlier. * Chapter 14. Global changes as described for "All chapters" earlier.
* Chapter 15. This chapter will include a side-bar illustrating how to use expression-bodied members in get and set accessors for properties. * Chapter 16. Similar to chapter 15, this chapter will include a side-bar showing how to use expression-bodied members in constructors and finalizers for indexers. * Chapter 17. Global changes as described for "All chapters" earlier. * Chapter 18. Global changes as described for "All chapters" earlier.
* Chapter 19. Global changes as described for "All chapters" earlier. * Chapter 20. Global changes as described for "All chapters" earlier. * Chapter 21. Global changes as described for "All chapters" earlier. * Chapter 22. Global changes as described for "All chapters" earlier.
* Chapter 23. This chapter will be updated to use the ValueTask type where appropriate. * Chapter 24. Global changes as described for "All chapters" earlier. * Chapter 25. Global changes as described for "All chapters" earlier. * Chapter 26. Cortana speech recognition has been updated and extended since the last release of the book (and is still subject to ongoing enhancements).
This chapter will be updated to use the latest versions of the Cortana Skills Kit and the Language Understanding Intelligence Service available when work on this chapter commences. * Chapter 27. This chapter will be updated to get readers to build an Azure API app rather than running a local web site. This will encourage readers to think more about scalability, and also act as an introduction to the Azure services available for developers building large-scale systems.