Click here to Skip to main content
15,921,793 members
Home / Discussions / C#
   

C#

 
GeneralRe: XML: Deserialize but don't Serialize Pin
Clive Pottinger8-Nov-06 14:52
Clive Pottinger8-Nov-06 14:52 
GeneralRe: XML: Deserialize but don't Serialize Pin
Clive Pottinger8-Nov-06 16:54
Clive Pottinger8-Nov-06 16:54 
QuestionXML Deserialization question Pin
Clive Pottinger6-Nov-06 5:49
Clive Pottinger6-Nov-06 5:49 
AnswerRe: XML Deserialization question Pin
S. Senthil Kumar6-Nov-06 6:41
S. Senthil Kumar6-Nov-06 6:41 
GeneralRe: XML Deserialization question [modified] Pin
Clive Pottinger6-Nov-06 7:25
Clive Pottinger6-Nov-06 7:25 
AnswerRe: XML Deserialization question Pin
Clive Pottinger6-Nov-06 7:52
Clive Pottinger6-Nov-06 7:52 
GeneralRe: XML Deserialization question Pin
S. Senthil Kumar7-Nov-06 5:30
S. Senthil Kumar7-Nov-06 5:30 
AnswerRe: XML Deserialization question Pin
Clive Pottinger8-Nov-06 15:10
Clive Pottinger8-Nov-06 15:10 
Thanks for the help everyone.

I finally managed to solve the problem.

Since the deserialisation is "serial", it only works on one element at a time, working its way down through the child items. I decided to take advantage of that. I created another class (to continue my previous example, let's call it SchoolInfo) and gave it a static member which I use to track the current item being deserialised.

So SchoolInfo.CurrentTeacher is set to the Teacher object by the Teacher class as is being constructed. Now all Class objects and Student objects can look at SchoolInfo.CurrentTeacher as they are being constructed or as their attributes are being deserialised - it tells them which Teacher they going to be assigned to before they are assigned.

It may not be the prettiest, but it works.

Thanks again.

Clive Pottinger,
Hamilton ON

QuestionNearest neighbour algorithm Pin
Islam Khalil Saber6-Nov-06 4:35
Islam Khalil Saber6-Nov-06 4:35 
AnswerRe: Nearest neighbour algorithm Pin
J4amieC6-Nov-06 4:42
J4amieC6-Nov-06 4:42 
AnswerCross posting Pin
leckey6-Nov-06 6:41
leckey6-Nov-06 6:41 
Questiondatagridview help needed Pin
giddy_guitarist6-Nov-06 4:34
giddy_guitarist6-Nov-06 4:34 
AnswerRe: datagridview help needed Pin
Rey99997-Nov-06 6:36
Rey99997-Nov-06 6:36 
GeneralRe: datagridview help needed Pin
giddy_guitarist7-Nov-06 21:59
giddy_guitarist7-Nov-06 21:59 
QuestionTesting the presence of a reference Pin
Maercu6-Nov-06 4:23
Maercu6-Nov-06 4:23 
AnswerRe: Testing the presence of a reference Pin
led mike6-Nov-06 5:08
led mike6-Nov-06 5:08 
AnswerRe: Testing the presence of a reference Pin
liRetro6-Nov-06 5:51
liRetro6-Nov-06 5:51 
AnswerRe: Testing the presence of a reference Pin
Maercu6-Nov-06 21:46
Maercu6-Nov-06 21:46 
QuestionWhich class I should use in communication? Pin
mertkan656-Nov-06 4:11
mertkan656-Nov-06 4:11 
QuestionWeird problem... [modified] Pin
Support1236-Nov-06 3:52
Support1236-Nov-06 3:52 
AnswerRe: Weird problem... Pin
ednrgc6-Nov-06 4:09
ednrgc6-Nov-06 4:09 
GeneralRe: Weird problem... Pin
Support1236-Nov-06 4:34
Support1236-Nov-06 4:34 
AnswerRe: Weird problem... Pin
Pete O'Hanlon6-Nov-06 4:25
mvePete O'Hanlon6-Nov-06 4:25 
GeneralRe: Weird problem... Pin
Support1236-Nov-06 4:38
Support1236-Nov-06 4:38 
GeneralRe: Weird problem... Pin
Pete O'Hanlon6-Nov-06 4:48
mvePete O'Hanlon6-Nov-06 4:48 

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.