Op Englesch liesen Editéieren

Deelen iwwer


WebServiceAttribute.Description Property

Definition

A descriptive message for the XML Web service.

C#
public string Description { get; set; }

Property Value

The text describing the functionality of the XML Web service.

Examples

The following example sets the Description property to "Common Server Variables".

ASP.NET (C#)
<%@ WebService Language="C#" Class= "ServerVariables"%>
 
 using System;
 using System.Web.Services;
 
 [ WebService(Description="Common Server Variables",Namespace="http://www.contoso.com/")]
 public class ServerVariables: WebService {
 
 
    [ WebMethod(Description="Obtains the Server Computer Name",EnableSession=false)]
    public string GetMachineName() {
       return Server.MachineName;
    }   
 }

Remarks

The descriptive message is displayed to prospective consumers of the XML Web service when description documents for the XML Web service are generated, such as the Service Description and the Service help page.

Applies to

Produkt Versiounen
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also