Question: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
Dim c1 As New Client("AReid", "Andy Reid", Status.Current)
Dim c2 As New Client("DAustin", "Dean Austin", Status.[New])
'Create ClientDictionary object
Dim cData As IDictionary = 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? -(VB.NET) 

A se the following code
Dim foundClient As Client
foundClient = DirectCast(cData.Find("10111"), Client) 

B Use the following code:
Dim foundClient As Client
If cData.Contains("10111") Then
foundClient = cData("10111")
End If 

C Use the following code:
Dim foundClient As Client
If cData.Contains("10111") Then
foundClient = DirectCast(cData("10111"), Client)
End If 

D Use the following code:
Dim foundClient As Client
For Each key As String In cData.Keys
If key = "10111" Then
foundClient = DirectCast(cData.Values("10111"), Client)
End If
Next 

+ Answer
+ Report
Total Preview: 1220

Copyright © 2024. Powered by Intellect Software Ltd