0

How can I save a ListView with multicolumns into Settings.settings and load them upon running? I'm trying to save a ListView with 3 columns. How can I do that?

4

1 回答 1

1
  1. 将列表视图绑定到某个数据结构。
  2. 序列化正在使用 xmlseriualizer - 然后您可以将结果保存到设置中。

使用反序列化完成恢复。

StringWriter output = new StringWriter(new StringBuilder());
XmlSerializer s = new XmlSerializer(this.GetType());
s.Serialize(output,this);
var result = output.ToString()
于 2009-12-06T07:51:33.403 回答