Answer (Choose 1 answer)
1.For Contact.xml file:
<?xml version="1.0"?>
<ArrayOfContact><Contact>
<ContactName>David</ContactName>
<Phone>030-0074321</Phone>
</Contact>
<Contact>
<ContactName>Jack</ContactName>
<Phone>050-763859</Phone>
</Contact>
</ArrayOfContact>
2. For code snippet:public class Contact{
public string ContactName { get; set; }
public string Phone { get; set; }
class Program{static void Main(string[] args){
FileStream stream = File.Open("Contacts.xml", FileMode.Open);var xs = new XmlSerializer(typeof(List<Contact>));var contactList = (List<Contact>)xs. Deserialize(stream);foreach (var contact in contactList){Console.WriteLine($"{contact. ContactName}");
} Console.ReadKey();
}
}
Which one of the following is the output of the above code?
A. David Jack
B. Jack
C. David
D. 050-763859
030-0074321
Exit 36