Open ctyar opened 4 years ago
I think it would be nice to keep the old file as csharp-8.cs, like how there are many files for old versions of HTML.
@dscorbett done. Also, there is a new line at the end of the old file, should I remove that too?
Yes, assuming that a final newline wasn’t necessary in C# 8.
If we're just focusing on the .cs
file itself and not the associated .csproj
file, using top-level statements, here's the smallest file that I could come up with:
int a;
This file builds and runs, outputs nothing, and is 6 bytes in size.
With top-level programs in C# 9, we can reduce the size significantly. The result is still same as: