dotnet / try-samples

Creative Commons Attribution 4.0 International
1.09k stars 623 forks source link

Erroneous descriptions in file: "try-samples/csharp8/static-local-functions.md" #54

Open lord-saumagen opened 4 years ago

lord-saumagen commented 4 years ago

Since there is more than one error in this page, I'm going through the errors by number.

Please take a look at the screenshot below.

1) There is no function named "LocalFunction" declared but a function named "localCounter". 2) There is no variable "y" declared in the enclosing scope. 3) There is no method "M" declared which forms the enclosing scope but a function named "Counter".

The page shows also the anti-pattern of "constantly renamed variables" and doesn't stick with the C# naming conventions. That are no errors but it's bad style. Since there is a good chance that programming novices might read this page, they might come to the conclusion that bad style isn't something to worry about.

Please don't give that impression.

Kind regards, Lord Saumagen.

Static_Local_Function