开发者

Save a ListView into Settings.settings?

开发者 https://www.devze.com 2022-12-13 04:20 出处:网络
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.开发者_StackOverflow How can I do that?

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.开发者_StackOverflow How can I do that?


  1. Bind the listview to some data structure.
  2. Serialize is using xmlseriualizer - then you can save the result into the Settings.

Restoring is done using deserialize.

StringWriter output = new StringWriter(new StringBuilder());
XmlSerializer s = new XmlSerializer(this.GetType());
s.Serialize(output,this);
var result = output.ToString()
0

精彩评论

暂无评论...
验证码 换一张
取 消