nerdexam
Microsoft

70-516 · Question #65

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses LINQ to SQL. You create a data model name AdvWorksDataContext, and you add the Product table…

The correct answer is A. string[] colorList = new string[] {"Black", "Red"}. See the full explanation below for the reasoning.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses LINQ to SQL. You create a data model name AdvWorksDataContext, and you add the Product table to the data model. The Product table contains a decimal column named ListPrice and a string column named Color. You need to update ListPrice column where the product color is Black or Red. Which code segment should you use?

Options

  • Astring[] colorList = new string[] {"Black", "Red"};
  • BAdvWorksDataContext dc = new AdvWorksDataContext("...");
  • CAdvWorksDataContext dc = new AdvWorksDataContext("...");
  • DAdvWorksDataContext dc = new AdvWorksDataContext("...");

How the community answered

(20 responses)
  • A
    70% (14)
  • B
    20% (4)
  • C
    5% (1)
  • D
    5% (1)

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice