XdmWriter.Create Method (TextWriter)XdmWriter.Create Method (TextWriter)XdmWriter::Create Method (TextWriter^)

Creates an XdmWriterXdmWriterXdmWriter instance using the specified TextWriterTextWriterTextWriter.

Syntax

Public Shared Function Create( _
    textWriter As System.IO.TextWriter _
) As XdmWriter
public static XdmWriter Create(
    System.IO.TextWriter textWriter
)
public:
static XdmWriter^ Create(
    System.IO::TextWriter^ textWriter
)
 

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullException textWriter is null a null reference (Nothing in Visual Basic) nullptr.
XdmExceptionXdmExceptionXdmExceptionThere is an error with the serialization configuration.

Remarks

An XdmWriterSettingsXdmWriterSettingsXdmWriterSettings object with default settings is used to create the writer with EncodingEncodingEncoding and ByteOrderMarkByteOrderMarkByteOrderMark set as appropriate to the supplied textWriter. If you wish to specify the serialization parameters on the created writer, use the overload that takes an XdmWriterSettingsXdmWriterSettingsXdmWriterSettings object as one of its arguments, and pass in an XdmWriterSettingsXdmWriterSettingsXdmWriterSettings object with the correct settings.