我最近熟悉了C#应用程序设置,看起来很酷.
我正在寻找一种存储自定义对象列表的方法,但我找不到方法!
实际上我看到了一个存储int []的帖子,但它对这个问题没有帮助.
我试图更改该解决方案的配置,以使其适合我的问题.它的XML配置文件是:
<Setting Name="SomeTestSetting" Type="System.Int32[]" Scope="User">
<Value Profile="(Default)" />
</Setting>
Run Code Online (Sandbox Code Playgroud)
我尝试在type属性中引用我的对象,但它没有帮助,因为它没有识别我的对象...我尝试了"type = List"和"type ="tuple []"
这两个选项没帮我!
我有一个类看起来像:
class tuple
{
public tuple()
{
this.font = new Font ("Microsoft Sans Serif",8);
this.backgroundcolor_color = Color.White;
this.foregroundcolor_color = Color.Black;
}
public string log { get; set; }
public Font font { get ; set; }
public String fontName { get; set; }
public string foregroundcolor { get; set; }
public Color foregroundcolor_color { get; set; } …Run Code Online (Sandbox Code Playgroud)