public static void Serialize(
Stream stream,
Object? obj,
XmlSerializationOptions options = XmlSerializationOptions.CompactSerializationOfPrimitiveArrays|XmlSerializationOptions.EscapeNewlineCharacters
)
Public Shared Sub Serialize (
stream As Stream,
obj As Object,
Optional options As XmlSerializationOptions = XmlSerializationOptions.CompactSerializationOfPrimitiveArrays Or XmlSerializationOptions.EscapeNewlineCharacters
)
public:
static void Serialize(
Stream^ stream,
Object^ obj,
XmlSerializationOptions options = XmlSerializationOptions::CompactSerializationOfPrimitiveArrays|XmlSerializationOptions::EscapeNewlineCharacters
)
static member Serialize :
stream : Stream *
obj : Object *
?options : XmlSerializationOptions
(* Defaults:
let _options = defaultArg options XmlSerializationOptions.CompactSerializationOfPrimitiveArrays|XmlSerializationOptions.EscapeNewlineCharacters
*)
-> unit
ArgumentNullException | stream must not be null. |
NotSupportedException | Serialization is not supported with provided options - or - The stream does not support writing. |
ReflectionException | The object hierarchy to serialize contains circular reference. |
IOException | An I/O error occurred. |
ObjectDisposedException | The stream is already closed. |