GSSP-NET · Question #205
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…
The correct answer is A. <?xml version="1.0" encoding="utf-8"?>. See the full explanation below for the reasoning.
Question
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 GIAC GSSP-.NET Exam }} You create an instance of the Car class. You fill the public fields of the Car class as shown in the table below:
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?
Exhibit
Options
- A<?xml version="1.0" encoding="utf-8"?>
- B<?xml version="1.0" encoding="utf-8"?>
- C<?xml version="1.0" encoding="utf-8"?>
- D<?xml version="1.0" encoding="utf-8"?>
How the community answered
(26 responses)- A69% (18)
- B4% (1)
- C19% (5)
- D8% (2)
Community Discussion
No community discussion yet for this question.
