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]
public class Person
{
[DataMember]
public string firstName;
[DataMember]
public string lastName;
[DataMember]
public int age;
[DataMember]
public int ID;
}

You need to ensure that the following XML segment is generated when the data contract is serialized.

<Person>
<firstName xsi:nil="true"/>
<lastName xsi:nil="true"/>
<lD>999999999 <ID>
</Person>

Which code segment should you use?

  1. [DataMember|
    public string firstName;
    [DataMember]
    public string lastName;
    [DataMember(EmitDefaultValue=true)]
    public int age = 0;
    [DataMember(EmitDefaultvalue=true")]
    public int ID = 999999999;
  2. [DataMember(EmitDefaultvalue false)]
    public string firstName = null;
    [DataMember(EmitDefaultValue = false)]
    public string lastName = null;
    [DataMember(EmitDefaultValue = true)]
    public int age = -1;
    [DataMember(EmitDefaultValue false)]
    public int ID = 999999999;
  3. [DataMember(EmitDefaultValue=true)]
    public string firstName;
    [DataMember(EmitDefaultValue=true)]
    public string IastName;
    [DataMember(EmitDefaultValue=false)]
    public int age = -1;
    [DataMember(EmitDefaultValue=false)]
    public int ID = 999999999
  4. [DataMember]
    public string firstName = null;
    [DataMember]
    public string lastName = null;
    [DataMember(EmitDefaultValue=false)]
    public int age = 0;
    [DataMember(EmitDefaultValue=false)]
    public int ID = 999999999;
Answer: Answer is d
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.

;