0

I learned the technique described in this article

http://www.codeproject.com/Articles/29130/Windows-Forms-Creating-and-Persisting-Custom-User

The article's title is "Windows Forms - Creating and Persisting Custom User Settings in C#". Also ApplicationSettingsBase class description on MSDN says

Acts as a base class for deriving concrete wrapper classes to implement the application settings feature in Window Forms applications.

What does this technique have to do with Windows Forms if it perfectly works (seemingly) without any WinForms dependency in a simple console application?

user10101
  • 1,704
  • 2
  • 20
  • 49
  • 1
    Nothing; this answer can't really be answered, but my guess is the author created a Windows Forms app to demo this functionality. As you've noted, it's really something that comes from System.Configuration and System.Collections so it can be used in a wide variety of apps - console, winforms, asp.net, windows services, and so on. – dash Jun 05 '12 at 21:59
  • But MSDN also mentions WinForms. http://msdn.microsoft.com/en-us/library/system.configuration.applicationsettingsbase.aspx Why? – user10101 Jun 05 '12 at 22:07
  • 1
    Again; speculative, but primarily because applications that store user settings tend to be GUI applications, hence Windows Forms, but could just as easily be ASP.Net. I wouldn't infer anything from it other than it is a common type of application where this example would be used. – dash Jun 05 '12 at 22:10

1 Answers1

1

The only reason that I can see is that the WinForms Form designer allows you to address the settings immediately:

Storing the Form's location and text

Storing the Form's location and text in the settings.

This is not mentioned in the tutorial you are referring to and a quite unknown feature.

Emond
  • 50,210
  • 11
  • 84
  • 115