GIAC GIAC Secure Software Programmer - C#.NET GSSP-.NET Question # 136 Topic 14 Discussion

GIAC GIAC Secure Software Programmer - C#.NET GSSP-.NET Question # 136 Topic 14 Discussion

GSSP-.NET Exam Topic 14 Question 136 Discussion:
Question #: 136
Topic #: 14

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create the definition for a Car class by using the following code segment:

public class Car {

[XmlAttribute(AttributeName = "category")]

public string CarType;

public string model;

[XmlIgnore]

public int year;

[XmlElement(ElementName = "mileage")]

public int miles;

public ConditionType condition;

public Car() {

}

public enum ConditionType {

[XmlEnum("Poor")] BelowAverage,

[XmlEnum("Good")] Average,

[XmlEnum("Excellent")] AboveAverage

}}

You create an instance of the Car class. You fill the public fields of the Car class as shown in the table below:

GSSP-.NET Question 136

You are required to recognize the XML block that is produced by the Car class after serialization. Which of the following XML blocks represents the output of serializing the Car class?


A.

xmlns:xsi="http://www.w3.org/2002/XMLSchema-instance "

xmlns:xsd="http://www.w3.org/2002/XMLSchema "

category="sedan">

racer

15000

Excellent


B.

xmlns:xsi="http://www.w3.org/2002/XMLSchema-instance "

xmlns:xsd="http://www.w3.org/2002/XMLSchema ">

sedan

racer

15000

Excellent


C.

xmlns:xsi="http://www.w3.org/2002/XMLSchema-instance "

xmlns:xsd="http://www.w3.org/2002/XMLSchema ""

CarType="sedan">

racer

15000

AboveAverage


D.

xmlns:xsi="http://www.w3.org/2002/XMLSchema-instance "

xmlns:xsd="http://www.w3.org/2002/XMLSchema "

category="sedan">

racer

15000

Excellent


Get Premium GSSP-.NET Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.