Click here to Skip to main content
15,911,531 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help with pointers Pin
Nick Seng12-Feb-04 21:40
Nick Seng12-Feb-04 21:40 
Generalconverting a string to an int Pin
Talal Sultan12-Feb-04 13:38
Talal Sultan12-Feb-04 13:38 
GeneralRe: converting a string to an int Pin
Nicholas Naddaf12-Feb-04 14:20
Nicholas Naddaf12-Feb-04 14:20 
GeneralRe: converting a string to an int Pin
Uwe Keim12-Feb-04 20:34
sitebuilderUwe Keim12-Feb-04 20:34 
GeneralRe: converting a string to an int Pin
Talal Sultan12-Feb-04 23:28
Talal Sultan12-Feb-04 23:28 
Generalcombining multiple crystal reports in one pdf file Pin
Visionsoft12-Feb-04 11:38
Visionsoft12-Feb-04 11:38 
QuestionLISTVIEW C# : Blinking a row ? Pin
youssef12-Feb-04 11:01
youssef12-Feb-04 11:01 
AnswerRe: LISTVIEW C# : Blinking a row ? Pin
Heath Stewart12-Feb-04 11:37
protectorHeath Stewart12-Feb-04 11:37 
GeneralWrapping Outlook's database... Pin
profoundwhispers12-Feb-04 10:53
profoundwhispers12-Feb-04 10:53 
GeneralRe: Wrapping Outlook's database... Pin
Heath Stewart12-Feb-04 11:31
protectorHeath Stewart12-Feb-04 11:31 
GeneralRe: Wrapping Outlook's database... Pin
profoundwhispers12-Feb-04 11:49
profoundwhispers12-Feb-04 11:49 
GeneralRe: Wrapping Outlook's database... Pin
Heath Stewart12-Feb-04 12:03
protectorHeath Stewart12-Feb-04 12:03 
GeneralListView Pin
Gary Kirkham12-Feb-04 10:20
Gary Kirkham12-Feb-04 10:20 
GeneralRe: ListView Pin
Heath Stewart12-Feb-04 11:15
protectorHeath Stewart12-Feb-04 11:15 
GeneralRe: ListView Pin
Gary Kirkham12-Feb-04 13:46
Gary Kirkham12-Feb-04 13:46 
GeneralRe: ListView Pin
Heath Stewart12-Feb-04 15:37
protectorHeath Stewart12-Feb-04 15:37 
GeneralCustom scrolling on control Pin
Judah Gabriel Himango12-Feb-04 10:00
sponsorJudah Gabriel Himango12-Feb-04 10:00 
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

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.