I have a small class that holds two strings as follows:
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;
}
}
I want to save an instance of this class to my settings file so that I can do the following:
ReportType reportType = Settings.Default.SelectedReportType;
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.