dotnet / dotnet/docs

"Main()" documentation should not detail hidden implementation from compiler

Open
#41,457 1 comment 0 reactions 0 assignees View on GitHub
:watch: Not Triaged
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
19h 10m
Merged PRs (30d)
268

Description

### Describe the issue or suggestion

I created this issue to follow up on this [PR comment posted by @richlander](https://github.com/dotnet/docs/pull/41356#discussion_r1634040716_) :
> I'm not sure it makes sense to document all this detail. It's an implementation detail. The compiler does plenty of codegen for you. This feels similar.

---

In the documentation [Main() and command-line arguments](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/main-command-line), the chapter [Async Main return values](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/main-command-line#async-main-return-values) reveal the boilerplate added by the compiler.

This level of detail is appropriate for this basic documentation, because it overwhelms novice reader with advanced concepts.

I suggest to remove boilerplate detail, but explain the task returned by `Main` is awaited.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.