Print a value
Print a value to see it on the screen.
Simple example
Start3
Result3
using System;
Console.WriteLine(3);
3
Advertisements
Everyday examples
A ticket machine displays 27. Show that number on the screen.
Start27
Result27
using System;
Console.WriteLine(27);
27
Run the example
dotnet new console --output Lesson
cp Program.cs Lesson/Program.cs
dotnet run --project Lesson