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

◆ Add() [1/2]

void System.Collections.EmptyReadOnlyDictionaryInternal.Add ( object key,
object value )
inline

Definition at line 121 of file EmptyReadOnlyDictionaryInternal.cs.

122 {
123 if (key == null)
124 {
125 throw new ArgumentNullException("key", SR.ArgumentNull_Key);
126 }
127 if (!key.GetType().IsSerializable)
128 {
129 throw new ArgumentException(SR.Argument_NotSerializable, "key");
130 }
131 if (value != null && !value.GetType().IsSerializable)
132 {
133 throw new ArgumentException(SR.Argument_NotSerializable, "value");
134 }
135 throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
136 }

References System.SR.Argument_NotSerializable, System.SR.ArgumentNull_Key, System.SR.InvalidOperation_ReadOnly, System.key, and System.value.