PrepAway - Latest Free Exam Questions & Answers

Which two lines of code should you insert between lines 02 and 03?

A Windows Communication Foundation (WCF) client application is consuming an RSS
syndication feed from a blog. You have a SyndicationFeed variable named feed. The
application iterates through the items as follows. (Line numbers are included for reference
only.) 01 foreach (SyndicationItem item in feed.Items) 02 { 03 } You need to display the
content type and body of every syndication item to the console. Which two lines of code
should you insert between lines 02 and 03?

PrepAway - Latest Free Exam Questions & Answers

A.
Console.WriteLine(item.Content.GetType()); Console.WriteLine(item.Content.ToString());

B.
Console.WriteLine(item.Content.Type); Console.WriteLine(item.Content.ToString());

C.
Console.WriteLine(item.Content.GetType());
Console.WriteLine(((TextSyndicationContent)item.Content).Text);

D.
Console.WriteLine(item.Content.Type);
Console.WriteLine(((TextSyndicationContent)item.Content).Text);


Leave a Reply