Which of the following code statements will John add in the application?

John works as a Software Developer for InfoTech Inc. He develops an application named SerializeObj. He creates a custom class and wants to serialize its object. He also wants the object to be stored into an XML file named File1.xml.

He writes the following code:

public class Employees

{

public string EmpID;

public string EmpName;

public decimal Salary;

}

Which of the following code statements will John add in the application?
A . XmlSerializer ObjectSerializer = new XmlSerializer(typeof(Employees), ObjectTypes);
B . XmlSerializer ObjectSerializer = new XmlSerializer(typeof(Employees));
C . XmlSerializer ObjectSerializer = new XmlSerializer(Employees);
D . XmlSerializer ObjectSerializer = new XmlSerializer();

Answer: B

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments