WebServiceAttribute.Description 属性
XML Web services 的描述性消息。
**命名空间:**System.Web.Services
**程序集:**System.Web.Services(在 system.web.services.dll 中)
语法
声明
Public Property Description As String
用法
Dim instance As WebServiceAttribute
Dim value As String
value = instance.Description
instance.Description = value
public string Description { get; set; }
public:
property String^ Description {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_Description ()
/** @property */
public void set_Description (String value)
public function get Description () : String
public function set Description (value : String)
属性值
对 XML Web services 的功能进行描述的文本。
备注
当生成 XML Web services 的说明文档(如“服务说明”和“服务帮助”页)时,该描述性消息将向 XML Web services 的预期使用者显示。
示例
下面的示例将 Description 属性设置为“Common Server Variables
”。
<%@ WebService Language="VB" Class= "ServerVariables"%>
Imports System
Imports System.Web.Services
<WebService(Description := "Common Server Variables", _
Namespace := "https://www.contoso.com/")> _
Public Class ServerVariables
Inherits WebService
<WebMethod(Description := "Obtains the Computer Machine Name", _
EnableSession := False)> _
Public Function GetMachineName() As String
Return Server.MachineName
End Function
End Class
<%@ WebService Language="C#" Class= "ServerVariables"%>
using System;
using System.Web.Services;
[ WebService(Description="Common Server Variables",Namespace="https://www.contoso.com/")]
public class ServerVariables: WebService {
[ WebMethod(Description="Obtains the Server Computer Name",EnableSession=false)]
public string GetMachineName() {
return Server.MachineName;
}
}
平台
Windows 98、Windows 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
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0
请参见
参考
WebServiceAttribute 类
WebServiceAttribute 成员
System.Web.Services 命名空间
WebMethodAttribute 类