WebGetAttribute.ResponseFormat Property


Gets and sets the ResponseFormat property.

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

One of the WebMessageFormat enumeration values.


The following example shows how to set the ResponseFormat property.

[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


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