First Program: top-level statements vs Program class; build & run
Compare top-level statements with the classic Program class, then build and run with the dotnet CLI; finish with quick debugging tips.
Two entry styles
Goal: See two ways to write your first app: top-level statements and the classic Program class with Main.
- Same behavior, different style
- Pick the style that is simplest for your sample
Build & run
dotnet CLI basics:
- dotnet new console – create project
- dotnet build – compile
- dotnet run – build and run
All lessons in this course
- What is C#, CLR/.NET, JIT vs AOT, SDK & dotnet CLI
- First Program: top-level statements vs Program class; build & run
- Project layout, NuGet restore, debugging basics