views:

153

answers:

1

I am in early beginning of learning and deploying Win App using C#,

Now I wanna try to build sample application with sample store configure settings inside, I want to application remember the users selection of three or four folders with other specific information, as sharing name, and other two or three values for describing selected folders

I am trying to do that in scholar way using app.config and Custom Configuration Sections but It is all much confusing to me, Making class for each element and more I read more I do not know how I cloud do it.

Now I wondering is there other ways to WinApp store config data and to that still be in one nice and accepted ways, I looked at INI files but it seems to me like an old app and I considering, Can I just open app.config as XmlDocument and than use Xpath to read and write my values. Or to I just put XML in working folder, But I now using app.conifg to store connection strings.

+1  A: 

You might consider looking at Isolated Storage which is a unified way to store config settings by different categories; by application, by user, by assembly, etc.

When an application stores data in a file, the file name and storage location must be carefully chosen to minimize the possibility that the storage location will be known to another application and, therefore, vulnerable to corruption. Without a standard system in place to manage these problems, developing ad hoc techniques that minimize storage conflicts can be complex and the results can be unreliable.

With isolated storage, data is always isolated by user and by assembly. Credentials such as the origin or the strong name of the assembly determine assembly identity. Data can also be isolated by application domain, using similar credentials.

Steve Cooper