title: How do I save/serialize a custom class to the settings file?
body: <p>I have a small class that holds two strings as follows:</p>
  
  <pre><code>    public class ReportType
      {
          private string displayName;
          public string DisplayName
          {
              get { return displayName; }
          }
  
          private string reportName;
          public string ReportName
          {
              get { return reportName; }
          }
  
          public ReportType(string displayName, string reportName)
          {
              this.displayName = displayName;
              this.reportName = reportName;
          }
      }
  </code></pre>
  
  <p>I want to save an instance of this class to my settings file so that I can do the following:</p>
  
  <pre><code>ReportType reportType = Settings.Default.SelectedReportType;
  </code></pre>
  
  <p>Googling seems to suggest that it is possible but there doesn't appear to be a clear guide anywhere for me to follow. I understand that some serialization is required but don't really know where to begin. Also, when I go into the Settings screen in Visual Studio and click "browse" under the Type column there is no option to select the current namespace which contains the ReportType class.</p>