The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection.
See Also:
KeyNotFoundException Members
Syntax
[System.Runtime.InteropServices.ComVisible(true)]
public class
KeyNotFoundException :
SystemExceptionRemarks
Requirements
Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0