Which structure will the data contract produce?

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You define the following data contract.

[DataContract(Namespace="urn:Company.Project")]
public class Person {
[DataMember]
public string FirstName;
[DataMember]
public string LastName;
[DataMember]
public IList<Person> Children;
[DataMember(Name="DateOfBirth")]
public DateTime Birthday;
}

You need to identify the structure of the resulting XML instance document.
Which structure will the data contract produce?

You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
You define the following data contract.

[DataContract(Namespace="urn:Company.Project")]
public class Person {
[DataMember]
public string FirstName;
[DataMember]
public string LastName;
[DataMember]
public IList<Person> Children;
[DataMember(Name="DateOfBirth")]
public DateTime Birthday;
}

You need to identify the structure of the resulting XML instance document.
Which structure will the data contract produce?

A.
<Person xmlns="urn:Company.Project">
<Birthday/>
<Children/>
<FirstName/>
<LastName/>
</Person>

B.
<Person xmlns="urn:Company.Project">
<Children/>
<DateOfBirth/>
<FirstName/>
<LastName/>
</Person>

C.
<Person xmlns="urn:Company.Project">
<DateOfBirth/>
<FirstName/>
<LastName/>
<ListOfChildren/>
</Person>

D.
<Person xmlns="urn:Company.Project">
<FirstName/>
<LastName/>
<Children/>
<DateOfBirth/>
</Person>



Leave a Reply 0

Your email address will not be published. Required fields are marked *