WebGetAttribute.ResponseFormat Property

Definition

Gets and sets the ResponseFormat property.

public System.ServiceModel.Web.WebMessageFormat ResponseFormat { get; set; }
Property Type

One of the WebMessageFormat enumeration values.

Examples

The following example shows how to set the ResponseFormat property.

[OperationContract]
[WebGet(ResponseFormat= WebMessageFormat.Json)]
long Mod(long x, long y);
<OperationContract()> _
<WebGet(ResponseFormat:=WebMessageFormat.Json)> _
Function Modulo(ByVal x As Long, ByVal y As Long) As Long

Remarks

This property determines the format of responses sent from a service operation. The two possible values are Xml and Json.