Share via


SoapServices.XmlNsForClrType 屬性

定義

取得 Common Language Runtime 型別的 XML 命名空間前置詞。

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

屬性值

Common Language Runtime 型別的 XML 命名空間前置詞。

例外狀況

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

範例

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

// Print the XML namespace for the CLR types.
Console::WriteLine( L"The XML namespace for the CLR types "
L"is {0}.", SoapServices::XmlNsForClrType );
// Print the XML namespace for the CLR types.
Console.WriteLine(
    "The XML namespace for the CLR types " + 
    "is {0}.",
    SoapServices.XmlNsForClrType);

備註

WSDL 和 SOAP 通訊協定會將 Common Language Runtime 類別編碼為 XML 命名空間。 目前的 屬性會指定 XML 命名空間的格式。 Common Language Runtime 類別的所有 XML 命名空間都是以目前屬性傳回的 開頭 String

適用於