XmlSerializerSerialize(String, Object, XmlSerializationOptions) Method
Serializes the object passed in obj into the specified fileName.
Namespace: KGySoft.Serialization.XmlAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
public static void Serialize(
string fileName,
Object? obj,
XmlSerializationOptions options = XmlSerializationOptions.CompactSerializationOfPrimitiveArrays|XmlSerializationOptions.EscapeNewlineCharacters
)
Public Shared Sub Serialize (
fileName As String,
obj As Object,
Optional options As XmlSerializationOptions = XmlSerializationOptions.CompactSerializationOfPrimitiveArrays Or XmlSerializationOptions.EscapeNewlineCharacters
)
public:
static void Serialize(
String^ fileName,
Object^ obj,
XmlSerializationOptions options = XmlSerializationOptions::CompactSerializationOfPrimitiveArrays|XmlSerializationOptions::EscapeNewlineCharacters
)
static member Serialize :
fileName : string *
obj : Object *
?options : XmlSerializationOptions
(* Defaults:
let _options = defaultArg options XmlSerializationOptions.CompactSerializationOfPrimitiveArrays|XmlSerializationOptions.EscapeNewlineCharacters
*)
-> unit
Parameters
- fileName String
- Name of the file to create for serialization.
- obj Object
- The Object to serialize.
- options XmlSerializationOptions (Optional)
- Options for serialization. This parameter is optional.
Default value: CompactSerializationOfPrimitiveArrays, EscapeNewlineCharacters