This page looks best with JavaScript enabled

Have I mentioned loving Extension Methods?

 ·  ☕ 1 min read

Here’s my new favorite:

1
2
3
4
public static string AppSetting(this string parameter)
{
   return System.Configuration.ConfigurationManager.AppSettings[parameter];
}

Now I can simply call

"BaseUrl".AppSetting();

Beautiful.

Share on

Leonard Smith
WRITTEN BY
Leonard Smith
Software Forger/Forager