Results 1 to 3 of 3

Thread: Xml Serialization question

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Xml Serialization question

    I have a static class.
    this static class has a reference to 2 other static classes.

    I want to be able to serialize/deserialize this class, so it serializes/deserializes ClassA and ClassB properties/values.

    so...

    ClassA

    Code:
    private static SomeClassA theStaticClassA;
    private static SomeClassB theStaticClassB;
    I would like the properties of these 2 classes to be serialized and deserialized.

    how can I do this? (.NET 2.0)


    currently I am doing this

    Code:
    XmlSerializer theXmlSerializer = new XmlSerializer(TheMouseManager.GetType());
    
                StreamWriter theTextWriter = new StreamWriter(theApplicationConfigName);
                theXmlSerializer.Serialize(theTextWriter, TheMouseManager);
                theTextWriter.Close();
    however nothing gets serialized even though there are properties and values set to those properties in this class.
    Last edited by Techno; Jul 6th, 2006 at 09:20 PM.

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width