Which code segment should you use?

You are writing a custom dictionary. The custom-dictionary class is named MyDictionary. You need to ensure that the dictionary is type safe. Which code segment should you use?

You are writing a custom dictionary. The custom-dictionary class is named MyDictionary. You need to ensure that the dictionary is type safe. Which code segment should you use?

A.
Class MyDictionaryImplements Dictionary(Of String, String)

B.
Class MyDictionary Inherits HashTable

C.
Class MyDictionary Implements IDictionary

D.
Class MyDictionary … End Class Dim t As New Dictionary(Of String, String)Dim dict As MyDictionary = CType(t, MyDictionary)



Leave a Reply 0

Your email address will not be published. Required fields are marked *