注册表读写 [英] Registry read and write

查看:76
本文介绍了注册表读写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

他们是否可以使用C#winforms读取和写入.csv文件到注册表?如果是的话怎么做请帮帮我?

解决方案

是的,但我真的不会。访问注册表变得越来越难(出于好的理由 - 它被严重滥用),并且在最好的时候,大的值(如CSV文件往往)不是一个好主意。



相反,为什么不将文件存储在更正常的位置,更有可能备份? 我应该在哪里存储数据? [ ^ ]提出一些建议,这是一个更容易玩。

如果你必须将它存储在注册表中,请看这里: http://www.c-sharpcorner.com/uploadfile/puranindia/the-windows-registry-in-C-Sharp/ [ ^ ]

您只需要: http:// msdn。 microsoft.com/en-us/library/microsoft.win32.registry.aspx [ ^ ]。



请看我对这个问题的评论。请参阅: http://en.wikipedia.org/wiki/Separation_of_concerns [ ^ ]。



-SA

Is their any way to read & write .csv file to the registry using C# winforms? If yes how to do that please help me?

解决方案

Yes, but I really wouldn't. It is getting harder and harder to access the registry (for good reasons - it was badly abused), and large values (as CSV files tend to be) aren't a good idea at the best of times.

Instead, why not store the file somewhere a bit more normal, and more likely to be backed up? Where should I store my data?[^] makes some suggestions, and it's a lot easier to play with.
If you must store it in the registry, then see here: http://www.c-sharpcorner.com/uploadfile/puranindia/the-windows-registry-in-C-Sharp/[^]


All you need is this: http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx[^].

And please see my comment to the question. Please see: http://en.wikipedia.org/wiki/Separation_of_concerns[^].

—SA


这篇关于注册表读写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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