mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-31 13:39:55 +01:00
Move from improvement to errata
This commit is contained in:
parent
621ac3aa7c
commit
8723d7cb9b
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
If you find any mistakes in the seventh edition, *C# 11 and .NET 7 - Modern Cross-Platform Development Fundamentals*, or if you have suggestions for improvements, then please [raise an issue in this repository](https://github.com/markjprice/cs11dotnet7/issues) or email me at markjprice (at) gmail.com.
|
||||
|
||||
[**Errata** (35 items)](errata.md): Typos, tool user interface changes, or mistakes in code that would cause a compilation error that prevents a successful build.
|
||||
[**Errata** (36 items)](errata.md): Typos, tool user interface changes, or mistakes in code that would cause a compilation error that prevents a successful build.
|
||||
|
||||
[**Improvements** (27 items)](improvements.md): Changes to text or code that would improve the content. These are optional.
|
||||
[**Improvements** (26 items)](improvements.md): Changes to text or code that would improve the content. These are optional.
|
||||
|
||||
All errata and improvements will be included in the 8th edition planned for publishing in November 2023. To be included they must be submitted by mid-September 2023.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
**Errata** (35 items)
|
||||
**Errata** (36 items)
|
||||
|
||||
If you find any mistakes, then please [raise an issue in this repository](https://github.com/markjprice/cs11dotnet7/issues) or email me at markjprice (at) gmail.com.
|
||||
|
||||
|
|
@ -29,6 +29,7 @@ If you find any mistakes, then please [raise an issue in this repository](https:
|
|||
- [Page 279 - Declaring non-nullable variables and parameters](#page-279---declaring-non-nullable-variables-and-parameters)
|
||||
- [Page 322 - Revealing the location of a type](#page-322---revealing-the-location-of-a-type)
|
||||
- [Page 330 - Publishing a self-contained app, Page 354 - Exercise 7.3 – Explore PowerShell](#page-330---publishing-a-self-contained-app-page-354---exercise-73--explore-powershell)
|
||||
- [Page 357 - Working with complex numbers](#page-357---working-with-complex-numbers)
|
||||
- [Page 399 - Managing directories](#page-399---managing-directories)
|
||||
- [Page 362 - Joining, formatting, and other string members](#page-362---joining-formatting-and-other-string-members)
|
||||
- [Page 412 - Compressing streams](#page-412---compressing-streams)
|
||||
|
|
@ -372,6 +373,26 @@ If you have Source Link disabled, then to see the filename you must expand the c
|
|||
|
||||
In the **Good Practice** box on page 330, I wrote about how you can automate commands using scripts written in the PowerShell language. My original plan was to write content about PowerShell in the GitHub repository. But PowerShell is a massive topic and there will always be higher priority content to create that is specifically about C# and .NET. In the next edition I will just reference the official PowerShell documentation: https://learn.microsoft.com/en-us/powershell/ And I will remove **Exercise 7.3** that suggests exploring PowerShell.
|
||||
|
||||
# Page 357 - Working with complex numbers
|
||||
|
||||
> Thanks to [Masoud Nazari](https://github.com/MAS-OUD) for raising this [issue on 25 March 2023](https://github.com/markjprice/cs11dotnet7/issues/50).
|
||||
|
||||
In Step 2, I show the default formatting for complex numbers i.e. using round brackets and commas, as well as a custom format, as shown in the following output:
|
||||
```
|
||||
(4, 2) added to (3, 7) is (7, 9)
|
||||
4 + 2i added to 3 + 7i is 7 + 9i
|
||||
```
|
||||
|
||||
> See the official documentation for the `Complex.ToString` method here: https://learn.microsoft.com/en-us/dotnet/api/system.numerics.complex.tostring
|
||||
|
||||
Although this is the behavior in .NET 6, in .NET 7 (and .NET 8 previews), the formatting of complex numbers uses angle brackets and semi-colons, as shown in the following output:
|
||||
```
|
||||
<4; 2> added to <3; 7> is <7; 9>
|
||||
4 + 2i added to 3 + 7i is 7 + 9i
|
||||
```
|
||||
|
||||
In the next edition, I will add a note about this. Since the official documentation still shows the behavior of .NET 6, this seems odd. My guess is that they decided to change to angle brackets and semi-colons because some cultures use round brackets to indicate negative numbers and use commas for decimal numbers. Therefore it would be confusing to have a mix of round brackets and commas meaning different things. Its a shame the documentation does not explain this and show the .NET 7 and later new default formats.
|
||||
|
||||
# Page 399 - Managing directories
|
||||
|
||||
> Thanks to [Dario Bosco](https://github.com/DarioBosco) for raising this [issue on 6 February 2023](https://github.com/markjprice/cs11dotnet7/issues/26).
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
**Improvements** (27 items)
|
||||
**Improvements** (26 items)
|
||||
|
||||
If you have suggestions for improvements, then please [raise an issue in this repository](https://github.com/markjprice/cs11dotnet7/issues) or email me at markjprice (at) gmail.com.
|
||||
|
||||
|
|
@ -18,7 +18,6 @@ If you have suggestions for improvements, then please [raise an issue in this re
|
|||
- [Page 339 - Viewing source links with Visual Studio 2022](#page-339---viewing-source-links-with-visual-studio-2022)
|
||||
- [Page 343 - Packaging a library for NuGet](#page-343---packaging-a-library-for-nuget)
|
||||
- [Page 351 - Using non-.NET Standard libraries](#page-351---using-non-net-standard-libraries)
|
||||
- [Page 357 - Working with complex numbers](#page-357---working-with-complex-numbers)
|
||||
- [Page 444 - Connecting to a database](#page-444---connecting-to-a-database)
|
||||
- [Page 453 - Scaffolding models using an existing database](#page-453---scaffolding-models-using-an-existing-database)
|
||||
- [Page 533 - Building websites using ASP.NET Core](#page-533---building-websites-using-aspnet-core)
|
||||
|
|
@ -365,26 +364,6 @@ for (int i = 0; i < matrix.Axes[1].Points.Length; i++)
|
|||
}
|
||||
```
|
||||
|
||||
# Page 357 - Working with complex numbers
|
||||
|
||||
> Thanks to [Masoud Nazari](https://github.com/MAS-OUD) for raising this [issue on 25 March 2023](https://github.com/markjprice/cs11dotnet7/issues/50).
|
||||
|
||||
In Step 2, I show the default formatting for complex numbers i.e. using round brackets and commas, as well as a custom format, as shown in the following output:
|
||||
```
|
||||
(4, 2) added to (3, 7) is (7, 9)
|
||||
4 + 2i added to 3 + 7i is 7 + 9i
|
||||
```
|
||||
|
||||
> See the official documentation for the `Complex.ToString` method here: https://learn.microsoft.com/en-us/dotnet/api/system.numerics.complex.tostring
|
||||
|
||||
Although this is the behavior in .NET 6, in .NET 7 (and .NET 8 previews), the formatting of complex numbers uses angle brackets and semi-colons, as shown in the following output:
|
||||
```
|
||||
<4; 2> added to <3; 7> is <7; 9>
|
||||
4 + 2i added to 3 + 7i is 7 + 9i
|
||||
```
|
||||
|
||||
In the next edition, I will add a note about this. Since the official documentation still shows the behavior of .NET 6, this seems very odd.
|
||||
|
||||
# Page 444 - Connecting to a database
|
||||
|
||||
I wrote, "To connect to a SQLite database, we just need to know the database filename, set using the parameter `Filename`."
|
||||
|
|
|
|||
Loading…
Reference in a new issue