ComponentOne List for WinForms
C1.Win.List.Util.Xml.Serialization Namespace / Serializer Class / Serialize Method / Serialize(Stream,Object,MemberInfo,XmlSerializerNamespaces,XmlTextWriter) Method
The Stream used to write the XML-document instance
The Object to serialize
The FieldInfo or MemberInfo object context for the object to serialize
The XmlSerializerNamespaces referenced by the object
The XmlWriter object reference. Call writer.Close after working with stream/writer.

In This Topic
    Serialize(Stream,Object,MemberInfo,XmlSerializerNamespaces,XmlTextWriter) Method
    In This Topic
    Serializes the specified Object and writes the XML-document instance to a file using the specified Stream. DOES NOT close the underlying stream. Useful for copying objects. Caller is responsible to call out writer.Close() to close writer and underlying stream.
    Syntax
    'Declaration
     
    
    Public Overloads Sub Serialize( _
       ByVal stream As Stream, _
       ByVal o As Object, _
       ByVal mi As MemberInfo, _
       ByVal namespaces As XmlSerializerNamespaces, _
       ByRef writer As XmlTextWriter _
    ) 
    public void Serialize( 
       Stream stream,
       object o,
       MemberInfo mi,
       XmlSerializerNamespaces namespaces,
       out XmlTextWriter writer
    )

    Parameters

    stream
    The Stream used to write the XML-document instance
    o
    The Object to serialize
    mi
    The FieldInfo or MemberInfo object context for the object to serialize
    namespaces
    The XmlSerializerNamespaces referenced by the object
    writer
    The XmlWriter object reference. Call writer.Close after working with stream/writer.
    See Also