Click here to Skip to main content
   

C#

 
AnswerRe: returning the largest int variable PinmvpDave Kreskowiak7-Dec-12 19:41 
GeneralRe: returning the largest int variable PinmemberRichB377-Dec-12 19:51 
AnswerRe: returning the largest int variable [modified] PinmemberCommDev9-Dec-12 0:52 
QuestionManual serialization of a class that contains the same class Pinmembernadavst7-Dec-12 12:34 
Hi,
 
I would like to serialize a class (Person),
That contains a field called "Spouse", of the same type(Person).
 
I'm having a bit of problem doing that because I don't know
when to stop writing.
 
I'm trying to do it manualy, not with XmlSerializer BinaryFormatter ect.
 
BTW
when I do try to serialize with the classes mentioned above, XmlSerializer - works fine only when I'm not serialize "Spouse" field.
with BinaryFormatter it works well.
 
public class Person
{
        public int Age { get; set; }
        public FullName Name { get; set; }
        public Address Address { get; set; }
        public Person Spouse { get; set; }
}

AnswerRe: Manual serialization of a class that contains the same class PinmvpRichard MacCutchan7-Dec-12 23:02 
GeneralRe: Manual serialization of a class that contains the same class Pinmembernadavst8-Dec-12 0:23 
GeneralRe: Manual serialization of a class that contains the same class PinmvpRichard MacCutchan8-Dec-12 23:20 
GeneralRe: Manual serialization of a class that contains the same class Pinmembernadavst9-Dec-12 21:53 
AnswerRe: Manual serialization of a class that contains the same class Pinmemberlukeer9-Dec-12 21:54 
GeneralRe: Manual serialization of a class that contains the same class Pinmembernadavst10-Dec-12 0:17 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 28 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid