private IDictionary_NonGeneric_Add_KeyOfWrongType ( int count ) : void | ||
count | int | |
Résultat | void |
public void IDictionary_NonGeneric_Add_KeyOfWrongType(int count)
{
if (!IsReadOnly)
{
IDictionary dictionary = new SortedList<string, string>();
object missingKey = 23;
Assert.Throws<ArgumentException>(() => dictionary.Add(missingKey, CreateTValue(12345)));
Assert.Empty(dictionary);
}
}