PRN221_-_FE_-_SU_2023_506.webp
K

PRN221_-_FE_-_SU_2023_506.webp

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

Thông tin

Category
PRN221
Thêm bởi
Kokichi20051
Ngày thêm
Lượt xem
1,125
Lượt bình luận
5
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRN221_-_FE_-_SU_2023_506.webp
File size
86.4 KB
Dimensions
1926px x 906px

Share this media

Back
Bên trên Bottom