nerdexam
Microsoft

70-516 · Question #61

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

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

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 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 retreive records from the ObjectCache table. (Line numbers are included for reference only.) 01 string s = GetConnectionStringFromConfigFile("xmldb"); 02 using (SqlConnection conn = new SqlConnection(s)) 03 using (SqlCommand cmd = new SqlCommand("select * from ObjectCache", conn)) 04 { 05 conn.Open(); 06 SqlDataReader rdr = cmd.ExecuteReader(); 07 while(rdr.Read()) 08 { 09 ... 10 DeserializeObject(obj); 11 } 12 } You need to retreive the data from the SerializedObjectData column and pass it to a method named DeserializeObject. Which line of code should you insert at line 09?

Options

  • AXmlReader obj = (XmlReader)rdr[1];
  • BSByte obj = (SByte)rdr[1];
  • CString obj = (String)rdr[1];
  • DType obj = (Type)rdr[1];

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