Share via


SoapServices.XmlNsForClrTypeWithAssembly 屬性

定義

取得預設 XML 命名空間前置詞,其應該使用於擁有組件但是沒有原生命名空間的 Common Language Runtime 類別的 XML 編碼方式。

public:
 static property System::String ^ XmlNsForClrTypeWithAssembly { System::String ^ get(); };
public static string XmlNsForClrTypeWithAssembly { get; }
static member XmlNsForClrTypeWithAssembly : string
Public Shared ReadOnly Property XmlNsForClrTypeWithAssembly As String

屬性值

預設 XML 命名空間前置詞,其應該使用於擁有組件但是沒有原生命名空間的 Common Language Runtime 類別的 XML 編碼方式。

例外狀況

立即呼叫端沒有基礎結構使用權限。

範例

下列程式代碼範例示範如何使用這個屬性。 此程式代碼範例是針對 類別提供的較大範例的 SoapServices 一部分。

// Print the XML namespace for the CLR types
// that have an assembly but no common language runtime namespace.
Console::WriteLine( L"The XML namespace for the CLR types "
   L"that have an assembly but no namespace, is {0}.",
   SoapServices::XmlNsForClrTypeWithAssembly );
// Print the XML namespace for the CLR types 
// that have an assembly but no common language runtime namespace.
Console.WriteLine(
    "The XML namespace for the CLR types " +
    "that have an assembly but no namespace, is {0}.",
    SoapServices.XmlNsForClrTypeWithAssembly);

備註

WSDL 和 SOAP 通訊協定會將 Common Language Runtime 類別編碼為 XML 命名空間。 目前的 屬性會指定 XML 命名空間的格式。 如果 Common Language Runtime 類別具有元件,但沒有命名空間,則目前的 屬性會傳回使用的預設 XML 命名空間。

適用於