Environment setup
Install the tools from the official guide. Save this program with the filename above the code, then run the command shown below. Seeing the number on screen means your first program ran.
Simple example
Print a number.
Start1
Result1
using System;
Console.WriteLine(1);
1
Advertisements
Everyday examples
The school fair has a screen at the entrance. Test it by showing the number of the first ticket.
Start101
Result101
using System;
Console.WriteLine(101);
101
Run the example
dotnet new console --output Lesson
cp Program.cs Lesson/Program.cs
dotnet run --project Lesson