Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

XmlSerializer.GenerateSerializer Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Returns an assembly that contains typed serializers.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Static member GenerateSerializer(Type[], XmlMapping[]) Infrastructure. Returns an assembly that contains custom-made serializers used to serialize or deserialize the specified type or types, using the specified mappings.
Public method Static member GenerateSerializer(Type[], XmlMapping[], CompilerParameters) Infrastructure. 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.
Top

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.