Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
A KeyNotFoundException is thrown when an attempt is made to retrieve a key or key value pair from a collection using a nonexistent key.
Associated Tips
- Check that the key you are using exists in the collection you are attempting to access.
This exception occurs when an operation attempts to retrieve an element in a collection using a key that does not exist in that collection.
Remarks
The ContainsKey method can be used to determine whether a key exists.
See Also
Tasks
How to: Find Out More About an Exception with the Exception Assistant