何らかの理由で、クラスの配列を設定に保存できないようです。コードは次のとおりです。
var newLink = new Link();
Properties.Settings.Default.Links = new ArrayList();
Properties.Settings.Default.Links.Add(newLink);
Properties.Settings.Default.Save();
私の Settings.Designer.cs では、フィールドを配列リストに指定しました。
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Collections.ArrayList Links {
get {
return ((global::System.Collections.ArrayList)(this["Links"]));
}
set {
this["Links"] = value;
}
}
何らかの理由で、Link クラスがシリアル化可能であり、テストしたにもかかわらず、データが保存されません。