English 中文(简体)
如何坚持从方案上建设?
原标题:How to persist from build programmatically?

我希望能够将一些信息从方案上输入<代码>Properties。 情况。 在我公布之前,有Default,但并未坚持。 我如何克服这一问题?

我有(作为试验):

private void button1_Click(object sender, EventArgs e)
{
    Properties.Settings.Default.Setting1 = "abc";
    Properties.Settings.Default.Save();
}

private void button2_Click(object sender, EventArgs e)
{
    Text = Properties.Settings.Default.Setting1;
}

我点击纽顿1,然后发表(点击),然后处理已出版的申请,点击纽特2。 是空的。

If don t publish the application, rather just close it and reopen it and click on button2 – I get "abc".

最佳回答

问题似乎是“用户”的范围。 但是,如果范围是“应用”,那么就很难在方案上加以改变。

因此似乎没有办法。 经常从方案上建设,即建设。

问题回答

见以下员额:

出版社为你点击了 but子。

您需要正确发现定型号(与申请环境相比),然后确定和节省。

Blank / doesn t exist / = somesettingToUpgrade

如果你在纽特州点击手和表Load说话,那么找到一个名字、设置和节省下来的固定环境,那么你就可以把这一点放在 but子上。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签