Skip to content

Instantly share code, notes, and snippets.

@PradeepLoganathan
Created December 20, 2019 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PradeepLoganathan/53a82c0f676099c77a9c34708e12b5fc to your computer and use it in GitHub Desktop.
Save PradeepLoganathan/53a82c0f676099c77a9c34708e12b5fc to your computer and use it in GitHub Desktop.
.net core console application - reading environmental variables
static async Task Main(string[] args)
{
IConfiguration Configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables()
.AddCommandLine(args)
.Build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment