stanbeard

stanbeard


  • Name: [not set]
  • Favorite Languages: [not set]
  • Website: [not set]
  • Location: [not set]
  • About Me: [not set]

Recent Comments

  • C# Tutorial - XML Serialization
    02/01/2010 - 01:58

    Great article!

    If I have:

    public class Movie {
        string Name;
        Actor LeadActor;
    }

    public class Actor {
        string Name;
        DateTime DOB;
    }

    And I want to serialize the Movie like this:

    <Movie>
        <Name>Casino Royale</Name>
        <LeadActor>Daniel Craig</LeadActor>
    </Movie>

    How do I do that? That is, how do I tell the Movie class to only serialize the Name property of the LeadActor member instead of the whole object?

    Thanks!