title: Cleaner way to initialize application Settings to default values
body: <p>I have a class called <code>LinearTransformation</code> whose values I want to set during execution so that they are used next time, and then can be overwritten, etc.</p>
  
  <p>Currently, I am verifying if there is a previous value and, if not, I set that value to a default one.</p>
  
  <p>The problem is: my code has become repetitive, ugly, and most of it will only be useful the first time a new installation is run on a client machine.</p>
  
  <p>Is there a more elegant way to achieve this?</p>
  
  <pre><code>    // This method is run when the app starts
      private void LoadCalibrações()
      {
          if (Properties.Settings.Default.CalibXEsq == null)
          {
              Properties.Settings.Default.CalibXEsq = new TransformaçãoLinear();
          }
  
          if (Properties.Settings.Default.CalibYEsq == null)
          {
              Properties.Settings.Default.CalibYEsq = new TransformaçãoLinear();
          }
  
          if (Properties.Settings.Default.CalibXDir == null)
          {
              Properties.Settings.Default.CalibXDir = new TransformaçãoLinear();
          }
  
          if (Properties.Settings.Default.CalibYDir == null)
          {
              Properties.Settings.Default.CalibYDir = new TransformaçãoLinear();
          }
  
          Properties.Settings.Default.Save();
  
  
          _calibrações = new[]
          {
              Properties.Settings.Default.CalibXEsq,
              Properties.Settings.Default.CalibYEsq,
              Properties.Settings.Default.CalibXDir,
              Properties.Settings.Default.CalibYDir
          };
      }
  </code></pre>