Liquid XML Objects (C#, Visual Basic .Net) / Using the Generated Code / Cloning/Deep Copying objects
In This Topic
    Cloning/Deep Copying objects
    In This Topic

    The objects generated using Liquid XML Objects can be cloned (deep copied) using the helper SerializerClone<T> Method. This produces a deep copy of the source object.

     

    The source object must be an object generated with LXO (i.e. it must be attributed with LxElementDefinitionAttribute Class or LxCompositorDefinitionAttribute Class.

    Example
    Copy Code
    using (XmlReader xmlReader = XmlReader.Create(@"MyXmlFile.xml"))
    {
        var myThing= serializer.Deserialize<MyXmlThing>(xmlReader);
        var myThingCopy = serializer.Clone(myThing);
    }