Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Coderrob/EnvSettings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

C# EnvSettings Utility

Quick and simple wrapper around the .Net Environment.GetEnvironmentVariable() function accessing environment variables.

Example uses:

// Get a string value by default
EnvSettings.Get("")

EnvSettings.Get("", EnvironmentVariableTarget.Machine)

// Get an int value from the AppSettings
EnvSettings.Get<int>("TimeoutValue")

EnvSettings.Get<int>("TimeoutValue", EnvironmentVariableTarget.User)

// A safe check around getting a numeric value
long value;
EnvSettings.TryGet<long>("IsntNumericValue", out value)

EnvSettings.TryGet<long>("IsntNumericValue", EnvironmentVariableTarget.Process, out value)

About

C# wrapper around .Net Environment.GetEnvironmentVariable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages