70-516 Questions And Answers
1.You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application uses the ADO.NET Entity Framework to model entities. You define a Category class by writing
the following code segment. (Line numbers are included for reference only.)
01 public class Category
02 {
03 public int CategoryID { get; set; }
04 public string CategoryName { get; set; }
05 public string Description { get; set; }
06 public byte[] Picture { get; set; }
07
08 }
You need to add a collection named Products to the Category class. You also need to ensure that the
collection supports deferred loading. Which code segment should you insert at line 07?
A.public static List
B.public virtual List
C.public abstract List
D.protected List
Answer: B
2.You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Forms
application. You plan to deploy the application to several shared client computers. You write the following
code segment. (Line numbers are included for reference only.)
01Configuration config = ConfigurationManager.OpenExeConfiguration(exeConfigName);
02
03config.Save();
04...
You need to encrypt the connection string stored in the .config file. Which code segment should you insert
at line 02?
A.ConnectionStringsSection section = config.GetSection("connectionString") as
ConnectionStringsSection;
section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
B.ConnectionStringsSection section = config.GetSection("connectionStrings") as
ConnectionStringsSection;
section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
C.ConnectionStringsSection section = config.GetSection("connectionString") as
ConnectionStringsSection;
section.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");
D.ConnectionStringsSection section = config.GetSection("connectionStrings") as
ConnectionStringsSection;
section.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");
Answer: D