Click here to Skip to main content
15,887,316 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to communicate to a device via serial port Pin
Pritesh Aryan28-Mar-11 20:55
Pritesh Aryan28-Mar-11 20:55 
AnswerRe: How to communicate to a device via serial port Pin
Ganesh Kumar Kaki13-Apr-11 2:35
Ganesh Kumar Kaki13-Apr-11 2:35 
QuestionDebugging a C# GUI app started via commandline Pin
wizardzz28-Mar-11 5:48
wizardzz28-Mar-11 5:48 
AnswerRe: Debugging a C# GUI app started via commandline Pin
Ian Shlasko28-Mar-11 5:58
Ian Shlasko28-Mar-11 5:58 
GeneralRe: Debugging a C# GUI app started via commandline Pin
wizardzz28-Mar-11 6:15
wizardzz28-Mar-11 6:15 
GeneralRe: Debugging a C# GUI app started via commandline Pin
Ian Shlasko28-Mar-11 6:45
Ian Shlasko28-Mar-11 6:45 
QuestionRead XML Into Class Hierarchy Pin
Kevin Marois28-Mar-11 5:10
professionalKevin Marois28-Mar-11 5:10 
AnswerRe: Read XML Into Class Hierarchy Pin
Ian Shlasko28-Mar-11 5:22
Ian Shlasko28-Mar-11 5:22 
Well, if the XML tags correspond to class names in a predefined namespace, you can use reflection to invoke the constructors, then more reflection to assign child properties (Maybe have each class implement an interface so you know where the children go)...

Alternatively, you can use something like a factory pattern and recurse through the XML tree manually, which gives you more capability and flexibility while requiring a lot more code both at the beginning and when things change down the road...

Kind of depends on the specifics of the situation.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)

GeneralRe: Read XML Into Class Hierarchy Pin
Kevin Marois28-Mar-11 5:33
professionalKevin Marois28-Mar-11 5:33 
GeneralRe: Read XML Into Class Hierarchy Pin
Ian Shlasko28-Mar-11 5:56
Ian Shlasko28-Mar-11 5:56 
GeneralRe: Read XML Into Class Hierarchy Pin
Not Active28-Mar-11 5:59
mentorNot Active28-Mar-11 5:59 
GeneralRe: Read XML Into Class Hierarchy Pin
SledgeHammer0128-Mar-11 6:10
SledgeHammer0128-Mar-11 6:10 
GeneralRe: Read XML Into Class Hierarchy Pin
Not Active28-Mar-11 6:21
mentorNot Active28-Mar-11 6:21 
GeneralRe: Read XML Into Class Hierarchy Pin
SledgeHammer0128-Mar-11 6:30
SledgeHammer0128-Mar-11 6:30 
GeneralRe: Read XML Into Class Hierarchy Pin
Not Active28-Mar-11 6:43
mentorNot Active28-Mar-11 6:43 
GeneralRe: Read XML Into Class Hierarchy Pin
SledgeHammer0128-Mar-11 6:50
SledgeHammer0128-Mar-11 6:50 
GeneralRe: Read XML Into Class Hierarchy Pin
Ian Shlasko28-Mar-11 6:53
Ian Shlasko28-Mar-11 6:53 
GeneralRe: Read XML Into Class Hierarchy Pin
Not Active28-Mar-11 7:13
mentorNot Active28-Mar-11 7:13 
GeneralRe: Read XML Into Class Hierarchy Pin
Ian Shlasko28-Mar-11 7:27
Ian Shlasko28-Mar-11 7:27 
GeneralRe: Read XML Into Class Hierarchy Pin
Not Active28-Mar-11 5:58
mentorNot Active28-Mar-11 5:58 
GeneralRe: Read XML Into Class Hierarchy Pin
SledgeHammer0128-Mar-11 6:20
SledgeHammer0128-Mar-11 6:20 
GeneralRe: Read XML Into Class Hierarchy Pin
Kevin Marois28-Mar-11 6:35
professionalKevin Marois28-Mar-11 6:35 
GeneralRe: Read XML Into Class Hierarchy Pin
Pete O'Hanlon28-Mar-11 6:37
mvePete O'Hanlon28-Mar-11 6:37 
GeneralRe: Read XML Into Class Hierarchy Pin
Kevin Marois28-Mar-11 6:43
professionalKevin Marois28-Mar-11 6:43 
GeneralRe: Read XML Into Class Hierarchy Pin
Pete O'Hanlon28-Mar-11 6:50
mvePete O'Hanlon28-Mar-11 6:50 

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.