SoapServices.XmlNsForClrTypeWithNsAndAssembly 属性

定义

获取应用于公共语言运行时类(同时具有公共语言运行时命名空间和程序集)的 XML 编码的默认 XML 命名空间前缀。

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

属性值

默认的 XML 命名空间前缀,该前缀应用于公共语言运行时类的 XML 编码,该类具有公共语言运行时命名空间和程序集。

例外

即时调用方没有基础结构权限。

示例

下面的代码示例演示如何使用此属性。 该代码示例是 SoapServices 类中的一个较大示例的一部分。

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

注解

WSDL 和 SOAP 协议将公共语言运行时类编码为 XML 命名空间。 当前属性指定 XML 命名空间的格式。 如果公共语言运行时类具有程序集和公共语言运行时命名空间,则当前属性将返回使用的默认 XML 命名空间。

适用于