XmlSerializer.GetXmlSerializerAssemblyName XmlSerializer.GetXmlSerializerAssemblyName XmlSerializer.GetXmlSerializerAssemblyName Method

定義

傳回組件名稱,該組件包含一個或多個 XmlSerializer 版本,是為序列化或還原序列化特定型別建立的。Returns the name of the assembly that contains one or more versions of the XmlSerializer especially created to serialize or deserialize specific types.

多載

GetXmlSerializerAssemblyName(Type) GetXmlSerializerAssemblyName(Type) GetXmlSerializerAssemblyName(Type)

傳回組件名稱,該組件包含一個或多個 XmlSerializer 版本,是為序列化或還原序列化特定型別建立的。Returns the name of the assembly that contains one or more versions of the XmlSerializer especially created to serialize or deserialize the specified type.

GetXmlSerializerAssemblyName(Type, String) GetXmlSerializerAssemblyName(Type, String) GetXmlSerializerAssemblyName(Type, String)

傳回組件名稱,該組件包含指定命名空間中指定型別的序列化程式。Returns the name of the assembly that contains the serializer for the specified type in the specified namespace.

備註

XML 序列化程式產生器工具 (Sgen.exe)建立類型的 XML 序列化組件中指定的組件,以改善執行時間效能XmlSerializer在序列化或還原序列化的物件指定的型別。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. 使用GetXmlSerializerAssemblyName來傳回這類組件的名稱。Use the GetXmlSerializerAssemblyName to return the name of such an assembly.

如果在散發這類組件會呼叫 Web 服務用戶端應用程式時,您可以套用XmlSerializerAssemblyAttribute用戶端類型,以指定的組件名稱與位置。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.

GetXmlSerializerAssemblyName(Type) GetXmlSerializerAssemblyName(Type) GetXmlSerializerAssemblyName(Type)

傳回組件名稱,該組件包含一個或多個 XmlSerializer 版本,是為序列化或還原序列化特定型別建立的。Returns the name of the assembly that contains one or more versions of the XmlSerializer especially created to serialize or deserialize the specified type.

public:
 static System::String ^ GetXmlSerializerAssemblyName(Type ^ type);
public static string GetXmlSerializerAssemblyName (Type type);
static member GetXmlSerializerAssemblyName : Type -> string

參數

type
Type Type Type

正在還原序列化的 TypeThe Type you are deserializing.

傳回

組件名稱,該組件包含型別的 XmlSerializerThe name of the assembly that contains an XmlSerializer for the type.

備註

XML 序列化程式產生器工具 (Sgen.exe)建立類型的 XML 序列化組件中指定的組件,以改善執行時間效能XmlSerializer在序列化或還原序列化的物件指定的型別。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. 使用GetXmlSerializerAssemblyName來傳回這類組件的名稱。Use the GetXmlSerializerAssemblyName to return the name of such an assembly.

如果在散發這類組件會呼叫 Web 服務用戶端應用程式時,您可以套用XmlSerializerAssemblyAttribute用戶端類型,以指定的組件名稱與位置。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.

GetXmlSerializerAssemblyName(Type, String) GetXmlSerializerAssemblyName(Type, String) GetXmlSerializerAssemblyName(Type, String)

傳回組件名稱,該組件包含指定命名空間中指定型別的序列化程式。Returns the name of the assembly that contains the serializer for the specified type in the specified namespace.

public:
 static System::String ^ GetXmlSerializerAssemblyName(Type ^ type, System::String ^ defaultNamespace);
public static string GetXmlSerializerAssemblyName (Type type, string defaultNamespace);
static member GetXmlSerializerAssemblyName : Type * string -> string

參數

type
Type Type Type

您所要的 TypeThe Type you are interested in.

defaultNamespace
String String String

型別的命名空間。The namespace of the type.

傳回

組件名稱,該組件包含特別建置的序列化程式。The name of the assembly that contains specially built serializers.

備註

XML 序列化程式產生器工具 (Sgen.exe)建立類型的 XML 序列化組件中指定的組件,以改善執行時間效能XmlSerializer在序列化或還原序列化的物件指定的型別。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. 使用GetXmlSerializerAssemblyName來傳回這類組件的名稱。Use the GetXmlSerializerAssemblyName to return the name of such an assembly.

如果在散發這類組件會呼叫 Web 服務用戶端應用程式時,您可以套用XmlSerializerAssemblyAttribute用戶端類型,以指定的組件名稱與位置。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.

適用於