title: C#: How to make sure a settings variable exists before attempting to use it from another assembly?
body: <p>I have the following:</p>
  
  <pre><code>using CommonSettings = MyProject.Commons.Settings;
  
  public class Foo
  {
      public static void DoSomething(string str)
      {
          //How do I make sure that the setting exists first?
          object setting = CommonSettings.Default[str];
  
          DoSomethingElse(setting);
      }
  }
  </code></pre>