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)

public static string GetXmlSerializerAssemblyName (
	Type type,
	string defaultNamespace
public static String GetXmlSerializerAssemblyName (
	Type type, 
	String defaultNamespace
public static function GetXmlSerializerAssemblyName (
	type : Type, 
	defaultNamespace : String
) : String
Not applicable.



The Type you are interested in.


The namespace of the type.

Return Value

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 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0