在Recourse中编辑一个txt文件 [英] Edit a txt file in Recourse

查看:101
本文介绍了在Recourse中编辑一个txt文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将数据保存在Recourse的txt文件中,以后再更改?





好​​的,谢谢,我现在明白了问题所在。

Is it possible to save data in a txt file in Recourse , en change it again later ?


Ok thanks , i understand now what the problem is.

TextBox1.Text = My.Resources.TextFile1





但我想要这个



But i want this

My.Resources.TextFile1 = TextBox1.Text



[/ EDIT]


[/EDIT]

推荐答案

如果您的意思是嵌入在可执行模块中的资源,例如在项目中创建为* .resx文件的资源,按定义它们是只读的。在运行时,您只能读取它们。您只能在开发期间修改资源。



这个原因比资源更重要:您根本无法修改任何已加载的可执行模块,而不是来自使用此文件的进程,而不是来自其他进程。这是重要的操作系统安全性和稳定性功能。顺便说一句,这与历史悠久的概念有关。



如果你想要别的东西,你需要澄清这个问题。







感谢您的澄清。这证明我的答案是正确的。你不能拥有像 My.Resources.TextFile1 = TextBox1.Text 这样的东西,不管你怎么办,整个想法都是错的。



但是,如果你试图解释为什么你想要它,你的目标是什么,你可以得到一些有用的建议。



-SA
If you mean resources embedded in the executable module, such as those created as *.resx files in your project, they are read-only by definition. During runtime, you can only read them. You can modify the resources only during development.

The reason for this is more fundamentally important than just resources: you cannot modify any of the loaded executable modules at all, not from the process using this file, not from other processes. This is the important OS safety and stability feature. By the way, this is related to the conceptions with a long history.

If you wanted something else, you need to clarify the question.



Thank you for clarification. It justifies that my answer was correct. You cannot have something like My.Resources.TextFile1 = TextBox1.Text, not matter what you try, the whole idea is wrong.

However, if you try to explain why would you want it, what was your goal, you can get some useful advice.

—SA


请参阅:在资源编辑器中查看和编辑资源 [ ^ ]。



这就是你要找的东西吗?
See this: Viewing and Editing Resources in a Resource Editor[^].

Is that what you''re looking for?


这篇关于在Recourse中编辑一个txt文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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