Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ this[object key]

object System.Collections.EmptyReadOnlyDictionaryInternal.this[object key]
getset

Implements System.Collections.IDictionary.

Definition at line 55 of file EmptyReadOnlyDictionaryInternal.cs.

56 {
57 get
58 {
59 if (key == null)
60 {
61 throw new ArgumentNullException("key", SR.ArgumentNull_Key);
62 }
63 return null;
64 }
65 set
66 {
67 if (key == null)
68 {
69 throw new ArgumentNullException("key", SR.ArgumentNull_Key);
70 }
71 if (!key.GetType().IsSerializable)
72 {
73 throw new ArgumentException(SR.Argument_NotSerializable, "key");
74 }
75 if (value != null && !value.GetType().IsSerializable)
76 {
77 throw new ArgumentException(SR.Argument_NotSerializable, "value");
78 }
79 throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
80 }
81 }