如何删除c#中的属性sae [英] how to delete properties sae in c#

查看:138
本文介绍了如何删除c#中的属性sae的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


i使用C#属性保存我的程序中的东西,它有安装文件,但是当我卸载程序然后我安装它以后我卸载之前保存的数字是在程序中,现在我想要的时候我卸载保存的程序将要删除,我该怎么办?

这是属性设置保存我使用

Hi i using C# properties for save something in my program and it has setup file, but when i uninstalled program and then i install it later but the number i saved before uninstall are in the program and now i want when i uninstall the program those saved are going to delete, how can i do it?
and this is properties setting save i using

properties.Setting.Default.a=12;
properties.Setting.Default.Save();



i不想保存,当我删除程序时

随着尊重


i don't want to it keep save when i deleted program
With Respect

推荐答案

有两种方法:

1)根据您的安装程序,添加卸载设置文件的卸载步骤。 (我不知道你是如何处理安装/卸载所以我可以具体)

2)作弊。在安装时设置第一个标志(或添加一个临时文件,然后在第一次运行应用程序时删除),在运行应用程序时将其设置为默认值。
Two ways to do it:
1) Depending on your installation program, add a uninstallation step which removes the settings file. (I have no idea how you are handling install / uninstall so I can be specific)
2) Cheat. Set a "firstrun" flag on installation (or add a temporary file which you then delete on the first run of the app) which sets all settings to their default value when you run your application.


这篇关于如何删除c#中的属性sae的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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