使用C#在Windows应用程序中使用的xml文件 [英] xml files used in windows application with c#

查看:67
本文介绍了使用C#在Windows应用程序中使用的xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将数据存储在xml文件中,并且在具有xml连接的Windows应用程序中使用.sql未使用.这是一个驾驶学校学习的模拟测试.所以我如何将数据存储在xml文件中以及与它的连接是什么xml数据库

i have store datas in xml file and it is used in windows application with xml connection.sql is not used.it is a driving school learning mock test.so how i stored the datas in xml file and what is the connection with the xml database

推荐答案

您需要使用序列化.我建议最好的序列化方法是使用数据合约.请参阅:
http://msdn.microsoft.com/en-us/library/ms733127.aspx [ ^ ].

请在我倡导这种方法的地方查看我过去的答案:
如何在我的表单应用程序? [ ^ ],
创建属性文件... [在列表框中添加项目vb.net不使用对象和数据库 [
You need to use serialization. The best approach to serialization I recommend is using Data Contracts. Please see:
http://msdn.microsoft.com/en-us/library/ms733127.aspx[^].

Please see my past answers where I advocate this approach:
How can I utilize XML File streamwriter and reader in my form application?[^],
Creating property files...[^].

See also, for an example of application and some motivation:
adding items on the listbox in vb.net not using the object and database[^].

—SA


这篇关于使用C#在Windows应用程序中使用的xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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