Skip to content

Instantly share code, notes, and snippets.

@adamralph
Last active August 29, 2015 14:15
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 adamralph/e59044baa3472cf3fce2 to your computer and use it in GitHub Desktop.
Save adamralph/e59044baa3472cf3fce2 to your computer and use it in GitHub Desktop.
Using ConfigR to pass values to your app via a static class
#r MyApp.exe
using MyApp;
Settings.Foo = "Bar";
namespace MyApp
{
using ConfigR;
public static class Program
{
public static void Main()
{
Config.Global.LoadLocalScriptFile();
Console.WriteLine(Settings.Foo);
}
}
}
namespace MyApp
{
public static class Settings
{
public static string Foo { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment