可学答题网 > 问答 > MCPD(70-536)题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

You work as an&#8194


You work as an application developer at Certkiller .com. Certkiller .com wants you to develop an application that stores and retrieves client information by means of a unique account number.You create a custom collection class, which implements the IDictionary interface,named ClientDictionary. The following code have been included into the new application. //Create Client objects Client c1 = new Client ("AReid", "Andy Reid", Status.Current); Client c2 = new Client ("DAustin", "Dean Austin", Status.New); //Create ClientDictionary object IDictionary cData = new ClientDictionary (); cData.Add ("10001", c1); cData.Add ("10002", c2); You use the same method to add other Client objects to the collection. You need to ensure that you are able to retrieve client information associated with the account number 10111.What should you do?()

  • A Use the following code: Client foundClient;foundClient = (Client) cData.Find ("10111"); 
  • B Use the following code: Client foundClient;if (cData.Contains ("10111")) foundClient = cData ["10111"]; 
  • C Use the following code: Client foundClient;if (cData.Contains ("10111"))foundClient =(Client) cData ["10111"]; 
  • D Use the following code: Client foundClient;foreach (string key in cData.Keys {if (key == "10111")foundClient = (Client) cData.Values ["10111"]; }
参考答案
参考解析:
分类:MCPD(70-536)题库
相关推荐

1、You work as an 

You work as an application developer at Certkiller .com. Certkiller .com has instructed&#8194...

2、You work as an 

You work as an Exchange Administrator for UniCom Inc.The company has a Windows 2008&#81...

3、You work as an 

You work as an administrator at ABC.com. The ABC.com network consists of a single&#8194...

4、You work as an 

You work as an administrator at ABC.com.The ABC.com network consists of a single domain...

5、You work as an 

You work as an administrator at ABC.com. The ABC.com network consists of a single&#8194...

6、You work as an 

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visu...