能否以窗口的形式储存简单数据? 类似于一家厨师储存价值,以说明最后被报废的工件。 这些数据是否在重载时仍然存在?
我已经有了一个数据库,如果需要,可以加以利用,但正在寻求更简单的储存解决办法。
增 编
能否以窗口的形式储存简单数据? 类似于一家厨师储存价值,以说明最后被报废的工件。 这些数据是否在重载时仍然存在?
我已经有了一个数据库,如果需要,可以加以利用,但正在寻求更简单的储存解决办法。
增 编
我发现,最容易储存和使用像这样的环境,就是创造可序列的环境;例如:
[Serializable()]
public class Settings()
{
public object Something { get; set; }
}
并且,如果你在申请结束时,你就可以将这一类别(即,将其作为某些地方的数据予以保存)传承。
之后,在您的申请负荷活动上:可以提取所节约的数据,你可以回过一切,因为你在结束申请之前,就使用了同样的物体。
考虑使用IsolatedStorage(见讨论)。 当我选择IsolatedStorage 相对于AppData档案储存? - http://msdn.microsoft.com/en-us/library/3ak841sy(v=V.100)。
在此,你有多种选择。
首先,您可使用。
Another, you could looking into storing the value in an AppConfig file.
Id说,上诉路线可能是最容易的。 你们都会创建档案(见这样做的链接),然后在档案中添加这一内容。
<appSettings>
<add key="SomeValue" value="SomeString" />
<appSettings>
Then use this to access the value.
ConfigurationSettings.AppSettings["SomeValue"]
And this to set it
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Add("SomeValue", "SomeString");
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
Hope this points you in the right direction.
What is the use of default keyword in C#? Is it introduced in C# 3.0 ?
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. ...
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 ...
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 ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
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, ...
Since I cannot order my dictionary, what is the best way of going about taking key value pairs and also maintaing an index?
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. ...