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

◆ BaseAdd()

void System.Collections.Specialized.NameObjectCollectionBase.BaseAdd ( string? name,
object? value )
inlineprotectedinherited

Definition at line 281 of file NameObjectCollectionBase.cs.

282 {
283 if (_readOnly)
284 {
285 throw new NotSupportedException(System.SR.CollectionReadOnly);
286 }
287 NameObjectEntry nameObjectEntry = new NameObjectEntry(name, value);
288 if (name != null)
289 {
290 if (_entriesTable[name] == null)
291 {
293 }
294 }
295 else if (_nullKeyEntry == null)
296 {
298 }
300 _version++;
301 }
virtual int Add(object? value)
virtual void Add(object key, object? value)
Definition Hashtable.cs:676
static string CollectionReadOnly
Definition SR.cs:28
Definition SR.cs:7

References System.Collections.Specialized.NameObjectCollectionBase._entriesArray, System.Collections.Specialized.NameObjectCollectionBase._entriesTable, System.Collections.Specialized.NameObjectCollectionBase._nullKeyEntry, System.Collections.Specialized.NameObjectCollectionBase._readOnly, System.Collections.Specialized.NameObjectCollectionBase._version, System.Collections.Hashtable.Add(), System.Collections.ArrayList.Add(), System.SR.CollectionReadOnly, System.Runtime.Serialization.Dictionary, and System.value.

Referenced by System.Collections.Specialized.NameValueCollection.Add(), and System.Collections.Specialized.NameObjectCollectionBase.BaseSet().