Created
January 6, 2020 17:17
-
-
Save ericstj/20497889f9d71ceb5d0f5fcc84cdede1 to your computer and use it in GitHub Desktop.
appsettings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp3.1</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" /> | |
</ItemGroup> | |
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace appsettings | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
System.Configuration.ConfigurationManager.AppSettings["hello"] = "world"; | |
Console.WriteLine("Hello World!"); | |
Console.WriteLine(System.Configuration.ConfigurationManager.AppSettings["hello"]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment