Skip to content

Instantly share code, notes, and snippets.

@richlander
Created October 13, 2020 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save richlander/741057e8c0c1906efeb46d4f4c4281cb to your computer and use it in GitHub Desktop.
Save richlander/741057e8c0c1906efeb46d4f4c4281cb to your computer and use it in GitHub Desktop.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<Nullable>Enable</Nullable>
</PropertyGroup>
</Project>
using System;
Console.WriteLine("Hello World!");
@qbit86
Copy link

qbit86 commented Nov 14, 2020

Note: This implies no usage of command line parameters.

@contact4manoj

And if you want to access command line arguments, args is available as a "magic" parameter.
https://devblogs.microsoft.com/dotnet/c-9-0-on-the-record/#top-level-programs

@contact4manoj
Copy link

And if you want to access command line arguments, args is available as a "magic" parameter.
https://devblogs.microsoft.com/dotnet/c-9-0-on-the-record/#top-level-programs

Thanks @qbit86.

@khellang
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment