Export (0) Print
Expand All

XmlSerializer.GenerateSerializer Method

Returns an assembly that contains typed serializers.

Name Description
XmlSerializer.GenerateSerializer (Type[], XmlMapping[]) Returns an assembly that contains custom-made serializers used to serialize or deserialize the specified type or types, using the specified mappings.
XmlSerializer.GenerateSerializer (Type[], XmlMapping[], CompilerParameters) Returns an assembly that contains custom-made serializers used to serialize or deserialize the specified type or types, using the specified mappings and compiler settings and options.

The XML Serializer Generator Tool (Sgen.exe) creates an XML serialization assembly for types in a specified assembly to improve the run-time performance of an XmlSerializer when it serializes or deserializes objects of the specified types. Use the GetXmlSerializerAssemblyName to return the name of such an assembly.

If you are distributing such an assembly as part of a client application that calls a Web service, you can apply the XmlSerializerAssemblyAttribute to the client type to specify the location and name of the assembly.

Community Additions

ADD
Show:
© 2014 Microsoft