Click here to Skip to main content
15,889,383 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom scrolling on control Pin
Heath Stewart12-Feb-04 11:09
protectorHeath Stewart12-Feb-04 11:09 
GeneralRe: Custom scrolling on control Pin
Judah Gabriel Himango12-Feb-04 15:01
sponsorJudah Gabriel Himango12-Feb-04 15:01 
GeneralRe: Custom scrolling on control Pin
Heath Stewart12-Feb-04 15:34
protectorHeath Stewart12-Feb-04 15:34 
GeneralRe: Custom scrolling on control Pin
Heath Stewart12-Feb-04 11:11
protectorHeath Stewart12-Feb-04 11:11 
GeneralBest algorithm... Pin
profoundwhispers12-Feb-04 9:09
profoundwhispers12-Feb-04 9:09 
GeneralRe: Best algorithm... Pin
Heath Stewart12-Feb-04 11:04
protectorHeath Stewart12-Feb-04 11:04 
GeneralWriting to app.config... Pin
profoundwhispers12-Feb-04 8:34
profoundwhispers12-Feb-04 8:34 
GeneralRe: Writing to app.config... Pin
Heath Stewart12-Feb-04 8:54
protectorHeath Stewart12-Feb-04 8:54 
There is no support for writing to a .config file like you can read from it in .NET. Being that it is just an XML file, you can use the classes in System.Xml to write to it.

I recommend you DO NOT save your controls to a .config file, though. This is meant for application settings, not necessary serialized content. In order to use the ConfigurationSettings mechanism in .NET effectively, you should also implement the IConfigurationSectionHandler interface so that you can get the configuration object easily using ConfigurationSettings.GetConfig. For a good article on extending this type of behavior, see Nick's article, An extension for a Configuration Settings class in .NET[^].

If you want to do what you need, you'd be better off using serialization. See the System.Xml.Serialization namespace for simple XML serialization, or the System.Runtime.Serialization for more advanced serialization, which probably wouldn't be necessary in your case. For more information on serialization in .NET, see Serializing Objects[^] in the .NET Framework SDK.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Writing to app.config... Pin
profoundwhispers12-Feb-04 9:10
profoundwhispers12-Feb-04 9:10 
Generalfinding bad resource strings on compile Pin
elena1234512-Feb-04 8:30
elena1234512-Feb-04 8:30 
GeneralRe: finding bad resource strings on compile Pin
leppie12-Feb-04 8:44
leppie12-Feb-04 8:44 
GeneralRe: finding bad resource strings on compile Pin
elena1234512-Feb-04 8:56
elena1234512-Feb-04 8:56 
GeneralRe: finding bad resource strings on compile Pin
Kentamanos12-Feb-04 9:05
Kentamanos12-Feb-04 9:05 
GeneralRe: finding bad resource strings on compile Pin
Heath Stewart12-Feb-04 8:59
protectorHeath Stewart12-Feb-04 8:59 
GeneralInvoke Method Compact Framework Pin
MobileLover12-Feb-04 7:52
MobileLover12-Feb-04 7:52 
GeneralRe: Invoke Method Compact Framework Pin
leppie12-Feb-04 8:47
leppie12-Feb-04 8:47 
GeneralRe: Invoke Method Compact Framework Pin
MobileLover12-Feb-04 10:43
MobileLover12-Feb-04 10:43 
GeneralWaiting for a form box to finish Pin
spindar12-Feb-04 6:02
spindar12-Feb-04 6:02 
GeneralRe: Waiting for a form box to finish Pin
Mazdak12-Feb-04 6:06
Mazdak12-Feb-04 6:06 
GeneralRe: Waiting for a form box to finish Pin
Nick Parker12-Feb-04 6:13
protectorNick Parker12-Feb-04 6:13 
GeneralRe: Waiting for a form box to finish Pin
Mazdak12-Feb-04 6:17
Mazdak12-Feb-04 6:17 
GeneralRe: Waiting for a form box to finish Pin
Nick Parker12-Feb-04 6:12
protectorNick Parker12-Feb-04 6:12 
GeneralRe: Waiting for a form box to finish Pin
spindar12-Feb-04 6:31
spindar12-Feb-04 6:31 
Generalusing a switch for a range of numbers Pin
fou9900412-Feb-04 5:45
fou9900412-Feb-04 5:45 
GeneralRe: using a switch for a range of numbers Pin
leppie12-Feb-04 6:09
leppie12-Feb-04 6:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.