Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

StronglyTypedAppSettings

Use Dependency Injection to enable Strongly Typed Application Settings

CODE:

System.Console.WriteLine("The bad"); System.Console.WriteLine(ConfigurationManager.AppSettings["ConfigSettings.SampleSetting1"]); System.Console.WriteLine(ConfigurationManager.AppSettings["ConfigSettings.SampleSetting2"]);

System.Console.WriteLine(); System.Console.WriteLine();

System.Console.WriteLine("The better"); var settings = new SettingsInstanceFactory().GetInstanceOfConfigSettings(); System.Console.WriteLine(settings.SampleSetting1); System.Console.WriteLine(settings.SampleSetting2);

OUTPUT:

The bad My value for ConfigSettings.SampleSetting1 My value for ConfigSettings.SampleSetting2

The better My value for ConfigSettings.SampleSetting1 My value for ConfigSettings.SampleSetting2 Press any key to continue . . .

About

No description, website, or topics provided.

Resources

Releases

No releases published

Packages

No packages published

Languages