Click here to Skip to main content
15,910,009 members
Home / Discussions / C#
   

C#

 
GeneralNumber TextBox Pin
Kamrul Hasan15-Jul-05 8:22
Kamrul Hasan15-Jul-05 8:22 
GeneralRe: Number TextBox Pin
Judah Gabriel Himango15-Jul-05 9:40
sponsorJudah Gabriel Himango15-Jul-05 9:40 
GeneralRe: Number TextBox Pin
MoustafaS15-Jul-05 10:28
MoustafaS15-Jul-05 10:28 
GeneralRe: Number TextBox Pin
Alomgir Miah15-Jul-05 11:14
Alomgir Miah15-Jul-05 11:14 
GeneralMenu Items Question Pin
zaboboa15-Jul-05 7:47
zaboboa15-Jul-05 7:47 
GeneralRe: Menu Items Question Pin
Robert Rohde15-Jul-05 10:23
Robert Rohde15-Jul-05 10:23 
GeneralRe: Menu Items Question Pin
zaboboa18-Jul-05 3:28
zaboboa18-Jul-05 3:28 
QuestionHow to XML Document to store settings? Pin
Cheng Zhong15-Jul-05 7:00
Cheng Zhong15-Jul-05 7:00 
Hi everyone,
It is said that using Xml Document to store application settings is better than store settings in an Ini file or Windows Registry, so I'd like to try this new way of storing settings. But I don't know how to Read/Write settings form/to an Xml Doucment. Who can give me a sample code(s) or E-mail these codes to me?

For example, in an Ini file:
[UserInfo]
FirstName=Cheng
LastName=Zhong
Age=19

[Window]
X=120
Y=345
Width=320
Height=240
Font.FamilyName=Arial
Font.Size=8
Font.Bold=True
Font.CharSet=936


How can I write the settings above to an Xml file(not convert it to Xml)?
And how can I load the settings like "Age" from an Xml file?
And how can I get the list of "Sections" or "Keywords"(maybe it is called
"Attributes" or "Nodes" in Xml)?

Both VB.Net Codes or C# Codes are OK. Thank you!

More, do you have some advice to store none-string-type settings and none-integer-type settings, like Color(System.Drawing.Color), Font (System.Drawing.Font), Handle(System.IntPtr), Array(System.Array)?

E-mail: zc_djx@hotmail.com

I'm learning VB.Net & C#, you are always welcome to help me!
AnswerRe: How to XML Document to store settings? Pin
DavidNohejl15-Jul-05 8:26
DavidNohejl15-Jul-05 8:26 
GeneralRe: How to XML Document to store settings? Pin
Cheng Zhong15-Jul-05 17:37
Cheng Zhong15-Jul-05 17:37 
AnswerRe: How to XML Document to store settings? Pin
Judah Gabriel Himango15-Jul-05 9:42
sponsorJudah Gabriel Himango15-Jul-05 9:42 
GeneralGraphics Class Pin
Amir Jalaly15-Jul-05 6:57
Amir Jalaly15-Jul-05 6:57 
GeneralRe: Graphics Class Pin
Dave Kreskowiak15-Jul-05 9:37
mveDave Kreskowiak15-Jul-05 9:37 
GeneralRe: Graphics Class Pin
Muhammad Gulzaib Khan16-Jul-05 9:03
Muhammad Gulzaib Khan16-Jul-05 9:03 
GeneralRe: Graphics Class Pin
Amir Jalaly16-Jul-05 20:56
Amir Jalaly16-Jul-05 20:56 
Generalcommunicate with other app from an app Pin
ppp00115-Jul-05 6:19
ppp00115-Jul-05 6:19 
GeneralRe: communicate with other app from an app Pin
Alexander Kent15-Jul-05 10:24
Alexander Kent15-Jul-05 10:24 
GeneralUpdating Windows components Pin
Heapster15-Jul-05 6:18
Heapster15-Jul-05 6:18 
GeneralRe: Updating Windows components Pin
Alexander Kent15-Jul-05 10:23
Alexander Kent15-Jul-05 10:23 
GeneralRe: Updating Windows components Pin
Heapster15-Jul-05 11:22
Heapster15-Jul-05 11:22 
GeneralPrinting Word Documents Pin
tartanmonkey15-Jul-05 4:56
tartanmonkey15-Jul-05 4:56 
GeneralRe: Printing Word Documents Pin
Dave Kreskowiak15-Jul-05 5:36
mveDave Kreskowiak15-Jul-05 5:36 
GeneralRe: Printing Word Documents Pin
tartanmonkey15-Jul-05 5:45
tartanmonkey15-Jul-05 5:45 
GeneralWriting into a .def file(definition file) Pin
Member 211897915-Jul-05 4:52
Member 211897915-Jul-05 4:52 
GeneralRe: Writing into a .def file(definition file) Pin
Colin Angus Mackay15-Jul-05 5:31
Colin Angus Mackay15-Jul-05 5:31 

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.