在 C# 应用程序中存储数据的最佳方式是什么 [英] What is the best way to store data in c# application

查看:42
本文介绍了在 C# 应用程序中存储数据的最佳方式是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作 Cookbook 应用程序来存储和阅读(和更新)菜谱,或者其他任何东西来练习 OOP 编程和思考.但是,我不确定在 c# (Visual Studio Express) 中哪种存储数据的方式(在这种情况下为食谱)是最好的.我想在程序中优化保存和加载数据,但我没有经验.什么是最好的方法?是通过 XML、SQL 还是纯 TXT?还是其他方式?

I want to make Cookbook application for storing and reading (and updating) recipes, or anything else to practice OOP programming and thinking. But, I am not sure, what way of storing data, in this case, recipes, is the best in c# (Visual Studio Express). I want to optimize saving and loading data in program, but I have no experience. What is the best way? Is it through XML, SQL, or just plain TXT? Or some other way?

推荐答案

我建议在 SqlExpress 中使用 localDB.

I would suggest using a localDB in SqlExpress.

Microsoft® SQL Server® 2012 Express 是一款功能强大且可靠的免费提供丰富可靠的数据存储的数据管理系统适用于轻量级网站和桌面应用程序.

Microsoft® SQL Server® 2012 Express is a powerful and reliable free data management system that delivers a rich and reliable data store for lightweight Web Sites and desktop applications.

http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx

http://technet.microsoft.com/en-us/library/hh510202.aspx

你也可以看看这个类似的问题.

You could also look at this similar question.

这里是关于 XML 与 DB,这表明 XML 正在失势.

Here as an article on XML vs. DB which shows XML is losing ground.

这篇关于在 C# 应用程序中存储数据的最佳方式是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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