如何反序列化列表/数组中的XML文件? [英] How can I deserialize XML Files in a list/array?

查看:67
本文介绍了如何反序列化列表/数组中的XML文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要获取一组文件,这些文件可以通过openfiledialog选择并保存到List或Array中。

I need to get a collection of files that can be selected with a openfiledialog and saved into a List or Array.

然后。当表单加载时,List / Array中的文件应该打开到文本框中。

Then. When The form loads, the files inside that List/Array should open into textboxes.

谢谢。

推荐答案

您可以使用Linq-2-XML将XML投影到anaymous类型列表或 列表中。自定义类型。

You can use Linq-2-XML to project the XML into a list of anaymous types or a list of  custom types.

http://www.tutorialsteacher.com/linq/what-is-linq

http://www.tutorialsteacher.com/linq/what-is-linq

http://www.dotnetcurry。 com / linq / 564 / linq-to-xml-tutorials-examples

http://www.dotnetcurry.com/linq/564/linq-to-xml-tutorials-examples

https://csharp-station.com/Tutorial/Linq/Lesson02

https://csharp-station.com/Tutorial/Linq/Lesson02

https://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b

https://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b


这篇关于如何反序列化列表/数组中的XML文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆