Comments (4)
P164. #4 - Not the first time that I have seen this in your book. My .cs file has "namespace CalculatorLibUnitTests;", Your example says to eliminate the ';', and put in the brackets '[]'. Is this something related to VS Code?
from cs10dotnet6.
The dotnet add package
and dotnet add reference
commands were explained previously on page 157. Obviously, if you need to add a package or reference you must specify what package or reference you want--it cannot guess for you. Or, just modify the .csproj
file directly as shown on page 163. This is easiest since you can just copy and paste from the ebook or from the code solution.
from cs10dotnet6.
C# 10 and .NET 6 introduces a feature called file-scoped namespace declarations. I introduce it on page 180. It simplifies code by removing the need for curly braces { } to declare the types inside a namespace. Either the old or new syntax works correctly.
from cs10dotnet6.
Thank you for raising this issue. In the 7th edition I will add examples of using the dotnet add
commands in Chapter 1 so readers know how to use them earlier. And all the code examples will be updated to use the file-scoped namespace declaration style too.
from cs10dotnet6.
Related Issues (20)
- Chapter04 composite HOT 1
- vs4win/Chapter04/PrimeFactorsLib/Primes.cs ugh
- Chapter 1 - Setting .NET 5 as the target HOT 1
- Chapter 16 section "Implementing open api analyzers and conventions" HOT 1
- Exploring the PowerShell language has label 3, but no content HOT 3
- Chapter 14 Layout not being applied to Razor pages HOT 4
- Chapter07 Packaging and Distributing .NET Types | Page 296 HOT 1
- Chapter 1 - Adding .NET Interactive Notebooks to VSCode HOT 2
- Chapter07 Packaging and Distributing .NET Types HOT 5
- Chapter 14 - Unable to create authentication database for SQL Server LocalDB HOT 3
- Chapter 01 Downloading and installing Visual Studio 2022 for Windows [pp 6-7] HOT 1
- Chapter 2 notebook has code related to nullable value HOT 1
- Why does 0.1+0.2 not equal 0.3, but 0.1+0.3 equals 0.4? And why we need the M to declare a decimal literal value? HOT 2
- Ch 02 - Following the DRY principle while completing one of the coding exercises HOT 1
- Thank you Mark HOT 1
- Polyglot Notebook has replaced .NET Interactive HOT 1
- SQLite3 - StringLength Attribute Not Honored HOT 1
- Chapter 17 A second operation was started on this context instance before a previous operation completed HOT 11
- how can i get code in charpter 21 in your book about wpf programing. HOT 1
- Visual Studio Code .md instructions on use are missing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs10dotnet6.