MetadataDocument.WriteTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WriteTo(Stream) |
Writes the content of the document into the specified stream. |
WriteTo(TextWriter, Encoding) |
Writes the content of the document into the specified text-writer. |
WriteTo(Stream)
Writes the content of the document into the specified stream.
public void WriteTo (System.IO.Stream document);
member this.WriteTo : System.IO.Stream -> unit
Public Sub WriteTo (document As Stream)
Parameters
Exceptions
The specified document is a null reference (Nothing in Visual Basic).
The specified document does not supports writing into.
Applies to
WriteTo(TextWriter, Encoding)
Writes the content of the document into the specified text-writer.
public void WriteTo (System.IO.TextWriter writer, System.Text.Encoding encoding = default);
member this.WriteTo : System.IO.TextWriter * System.Text.Encoding -> unit
Public Sub WriteTo (writer As TextWriter, Optional encoding As Encoding = Nothing)
Parameters
- writer
- TextWriter
A TextWriter that will persist the document's content.
Exceptions
The specified writer is a null reference (Nothing in Visual Basic).
Remarks
If an optional encoding is specified, it should match the encoding that was used during the serialization of the content.