Question: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? - (VB.Net)
A Class MyDictionary
Inherits Dictionary(Of String, String)
End ClassB Class MyDictionary
Inherits HashTable
End ClassC Class MyDictionary
Implements IDictionary
End ClassD Private Class MyDictionary
End Class
Private t As New Dictionary(Of String, String)()
Private dictionary As MyDictionary = DirectCast(t, MyDictionary)
+ AnswerA
+ Report