News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
[DataContract(Namespace = '']
public class Item
{
[ServiceContract(Namespace = '')]
public interface Catalog
{
[OperationContract]
[WebInvoke(Method="POST", UriTemplate="Item")]
Item UpdateItem(Item item);
}
}

The client application receives a WebResponse named response with the response from the service. You need to deserialize this response into a strongly typed object representing the return value of the method. Which code segment should you use?

  1. DataContractSerializer s = new DataContractSerializer(typeof(Item));
    Item item = s.ReadObject(response.GetResponseStream0) as ttem;
  2. BinaryFormatter f = new BinaryFormatter();
    Item item = f.Deserialize(response.GetResponseStream() as Item;
  3. XmlDictionaryReader r = JsonReaderWriterFactory.CreateJsonReader(response.GetResponseStream(), XmlDictionaryReaderQuotas.Max);
    DataContractSerializer s = new DataContractSerializer(typeof(Item));
    Item item s.ReadObject(r) as Item;
  4. DataContractJsonSerializer s = new DataContractJsonSerializer(typeof(Item));
    Item item = s.ReadObject(response.GetResponseStream()) as Item;
Answer: Answer is a
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;