This documentation is archived and is not being maintained.

XmlSerializer.GetXmlSerializerAssemblyName Method (Type, String)

Returns the name of the assembly that contains the serializer for the specified type in the specified namespace.

Namespace:  System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)

[PermissionSetAttribute(SecurityAction.Demand, Name = "FullTrust")]
public static string GetXmlSerializerAssemblyName(
	Type type,
	string defaultNamespace
)

Parameters

type
Type: System.Type

The Type you are interested in.

defaultNamespace
Type: System.String

The namespace of the type.

Return Value

Type: System.String
The name of the assembly that contains specially built serializers.

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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: