nerdexam
Microsoft

70-516 · Question #225

70-516 Question #225: Real Exam Question with Answer & Explanation

Sign in or unlock 70-516 to reveal the answer and full explanation for question #225. The question stem and answer options stay visible for context.

Question

You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL Server 2008 database. You add the following table to the database. CREATE TABLE ObjectCache ( Id INT IDENTITY PRIMARY KEY, SerializedObjectData XML ) You write the following code segment to retrieve records from the ObjectCache table. (Line numbers are included for reference only.) 01Dim s As String = GetConnectStringFromConfigFile("xmldb") 02Using conn As New SqlConnection(s) 03Using cmd As New SqlCommand( 04"select * from ObjectCache", conn)) 06conn.Open() 07Dim rdr As SqlDataReader = cmd.ExecuteReader() 08While rdr.Read() 10DeserializeObject(obj) 11End While 12End Using 13End Using You need to retrieve the data from the SerializedObjectData column and pass it to a method named DeserializeObject. Which line of code should you insert at line 9?

Options

  • ADim obj As XmlReader = DirectCast(rdr(1), XmlReader)
  • BDim obj As SByte = DirectCast(rdr(1), SByte)
  • CDim obj As String = DirectCast(rdr(1), String)
  • DDim obj As Type = rdr(1).GetType()

Unlock 70-516 to see the answer

You've previewed enough free 70-516 questions. Unlock 70-516 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 70-516 Practice