markjprice / cs11dotnet7

Repository for the Packt Publishing book titled "C# 11 and .NET 7 - Modern Cross-Platform Development Fundamentals" by Mark J. Price
566 stars 206 forks source link

Page 149 #84

Closed DrAvriLev closed 1 year ago

DrAvriLev commented 1 year ago

When creating the new class "Program.Functions.cs", VS generate also a namespace. That, I think, creates an error # CS0103 saying that "The name 'TimesTable' does not exist in the current context.

Only after removing the namespace line, the error disapear and all come back to normal.

What happend?

Avri

markjprice commented 1 year ago

Yes, Step 4 shows the entire file. You must not define a namespace. This is covered here: https://github.com/markjprice/cs11dotnet7/blob/main/docs/errata/improvements.md#page-149---writing-a-times-table-function

DrAvriLev commented 1 year ago

Thank you :)