Debian Codegraph @

mcs/class/referencesource/mscorlib/system/collections/generic/keynotfoundexception.cs

raw
1 // ==++==
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // ==--==
6 /*=============================================================================
7 **
8 ** Class: KeyNotFoundException
9 **
10 ** <OWNER>Microsoft</OWNER>
11 **
12 **
13 ** Purpose: Exception class for Hashtable and Dictionary.
14 **
15 **
16 =============================================================================*/
17
18 namespace System.Collections.Generic {
19
20 using System;
21 using System.Runtime.Remoting;
22 using System.Runtime.Serialization;
23
24 [Serializable]
25 [System.Runtime.InteropServices.ComVisible(true)]
26 public class KeyNotFoundException : SystemException, ISerializable {
27
28 public KeyNotFoundException ()
29 : base(Environment.GetResourceString("Arg_KeyNotFound")) {
30 SetErrorCode(System.__HResults.COR_E_KEYNOTFOUND);
31 }
32
33 public KeyNotFoundException(String message)
34 : base(message) {
35 SetErrorCode(System.__HResults.COR_E_KEYNOTFOUND);
36 }
37
38 public KeyNotFoundException(String message, Exception innerException)
39 : base(message, innerException) {
40 SetErrorCode(System.__HResults.COR_E_KEYNOTFOUND);
41 }
42
43
44 protected KeyNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) {
45 }
46 }
47 }