mscorlib(4.0.0.0) API with additions
|
Represents a collection of key/value pairs that are organized based on the hash code of the key.To browse the .NET Framework source code for this type, see the Reference Source. More...
Public Member Functions | |
Hashtable () | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the default initial capacity, load factor, hash code provider, and comparer. More... | |
Hashtable (int capacity) | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity, and the default load factor, hash code provider, and comparer. More... | |
Hashtable (int capacity, float loadFactor) | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity and load factor, and the default hash code provider and comparer. More... | |
Hashtable (int capacity, float loadFactor, IHashCodeProvider hcp, IComparer comparer) | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity, load factor, hash code provider, and comparer. More... | |
Hashtable (int capacity, float loadFactor, IEqualityComparer equalityComparer) | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity, load factor, and T:System.Collections.IEqualityComparer object. More... | |
Hashtable (IHashCodeProvider hcp, IComparer comparer) | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the default initial capacity and load factor, and the specified hash code provider and comparer. More... | |
Hashtable (IEqualityComparer equalityComparer) | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the default initial capacity and load factor, and the specified T:System.Collections.IEqualityComparer object. More... | |
Hashtable (int capacity, IHashCodeProvider hcp, IComparer comparer) | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity, hash code provider, comparer, and the default load factor. More... | |
Hashtable (int capacity, IEqualityComparer equalityComparer) | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity and T:System.Collections.IEqualityComparer, and the default load factor. More... | |
Hashtable (IDictionary d) | |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the default load factor, hash code provider, and comparer. More... | |
Hashtable (IDictionary d, float loadFactor) | |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the specified load factor, and the default hash code provider and comparer. More... | |
Hashtable (IDictionary d, IHashCodeProvider hcp, IComparer comparer) | |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the default load factor, and the specified hash code provider and comparer. This API is obsolete. For an alternative, see M:System.Collections.Hashtable.::ctor(System.Collections.IDictionary,System.Collections.IEqualityComparer). More... | |
Hashtable (IDictionary d, IEqualityComparer equalityComparer) | |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to a new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the default load factor and the specified T:System.Collections.IEqualityComparer object. More... | |
Hashtable??? (IDictionary d, float loadFactor, IHashCodeProvider hcp, IComparer comparer) | |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the specified load factor, hash code provider, and comparer. More... | |
Hashtable??? (IDictionary d, float loadFactor, IEqualityComparer equalityComparer) | |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the specified load factor and T:System.Collections.IEqualityComparer object. More... | |
virtual void | Add (object key, object value) |
Adds an element with the specified key and value into the T:System.Collections.Hashtable. More... | |
virtual void | Clear () |
Removes all elements from the T:System.Collections.Hashtable. More... | |
virtual object | Clone () |
Creates a shallow copy of the T:System.Collections.Hashtable. More... | |
virtual bool | Contains (object key) |
Determines whether the T:System.Collections.Hashtable contains a specific key. More... | |
virtual bool | ContainsKey (object key) |
Determines whether the T:System.Collections.Hashtable contains a specific key. More... | |
virtual bool | ContainsValue (object value) |
Determines whether the T:System.Collections.Hashtable contains a specific value. More... | |
virtual void | CopyTo (Array array, int arrayIndex) |
Copies the T:System.Collections.Hashtable elements to a one-dimensional T:System.Array instance at the specified index. More... | |
virtual IDictionaryEnumerator | GetEnumerator () |
Returns an T:System.Collections.IDictionaryEnumerator that iterates through the T:System.Collections.Hashtable. More... | |
virtual void | Remove (object key) |
Removes the element with the specified key from the T:System.Collections.Hashtable. More... | |
virtual void | GetObjectData (SerializationInfo info, StreamingContext context) |
Implements the T:System.Runtime.Serialization.ISerializable interface and returns the data needed to serialize the T:System.Collections.Hashtable. More... | |
virtual void | OnDeserialization (object sender) |
Implements the T:System.Runtime.Serialization.ISerializable interface and raises the deserialization event when the deserialization is complete. More... | |
Static Public Member Functions | |
static Hashtable | Synchronized (Hashtable table) |
Returns a synchronized (thread-safe) wrapper for the T:System.Collections.Hashtable. More... | |
Public Attributes | |
virtual bool | IsReadOnly => false |
Gets a value indicating whether the T:System.Collections.Hashtable is read-only. More... | |
virtual bool | IsFixedSize => false |
Gets a value indicating whether the T:System.Collections.Hashtable has a fixed size. More... | |
virtual bool | IsSynchronized => false |
Gets a value indicating whether access to the T:System.Collections.Hashtable is synchronized (thread safe). More... | |
virtual int | Count => count |
Gets the number of key/value pairs contained in the T:System.Collections.Hashtable. More... | |
Protected Member Functions | |
Hashtable (SerializationInfo info, StreamingContext context) | |
Initializes a new, empty instance of the T:System.Collections.Hashtable class that is serializable using the specified T:System.Runtime.Serialization.SerializationInfo and T:System.Runtime.Serialization.StreamingContext objects. More... | |
virtual int | GetHash (object key) |
Returns the hash code for the specified key. More... | |
virtual bool | KeyEquals (object item, object key) |
Compares a specific T:System.Object with a specific key in the T:System.Collections.Hashtable. More... | |
Protected Attributes | |
IEqualityComparer | EqualityComparer => _keycomparer |
Gets the T:System.Collections.IEqualityComparer to use for the T:System.Collections.Hashtable. More... | |
Properties | |
IHashCodeProvider | hcp [get, set] |
Gets or sets the object that can dispense hash codes. More... | |
IComparer | comparer [get, set] |
Gets or sets the T:System.Collections.IComparer to use for the T:System.Collections.Hashtable. More... | |
virtual object | this[object key] [get, set] |
Gets or sets the value associated with the specified key. More... | |
virtual ICollection | Keys [get] |
Gets an T:System.Collections.ICollection containing the keys in the T:System.Collections.Hashtable. More... | |
virtual ICollection | Values [get] |
Gets an T:System.Collections.ICollection containing the values in the T:System.Collections.Hashtable. More... | |
virtual object | SyncRoot [get] |
Gets an object that can be used to synchronize access to the T:System.Collections.Hashtable. More... | |
![]() | |
object | this[object key] [get, set] |
Gets or sets the element with the specified key. More... | |
ICollection | Keys [get] |
Gets an T:System.Collections.ICollection object containing the keys of the T:System.Collections.IDictionary object. More... | |
ICollection | Values [get] |
Gets an T:System.Collections.ICollection object containing the values in the T:System.Collections.IDictionary object. More... | |
bool | IsReadOnly [get] |
Gets a value indicating whether the T:System.Collections.IDictionary object is read-only. More... | |
bool | IsFixedSize [get] |
Gets a value indicating whether the T:System.Collections.IDictionary object has a fixed size. More... | |
![]() | |
int | Count [get] |
Gets the number of elements contained in the T:System.Collections.ICollection. More... | |
object | SyncRoot [get] |
Gets an object that can be used to synchronize access to the T:System.Collections.ICollection. More... | |
bool | IsSynchronized [get] |
Gets a value indicating whether access to the T:System.Collections.ICollection is synchronized (thread safe). More... | |
Represents a collection of key/value pairs that are organized based on the hash code of the key.To browse the .NET Framework source code for this type, see the Reference Source.
Definition at line 17 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | ) |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the default initial capacity, load factor, hash code provider, and comparer.
Definition at line 665 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | int | capacity | ) |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity, and the default load factor, hash code provider, and comparer.
capacity | The approximate number of elements that the T:System.Collections.Hashtable object can initially contain. |
T:System.ArgumentOutOfRangeException | capacity is less than zero. |
Definition at line 674 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | int | capacity, |
float | loadFactor | ||
) |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity and load factor, and the default hash code provider and comparer.
capacity | The approximate number of elements that the T:System.Collections.Hashtable object can initially contain. |
loadFactor | A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets. |
T:System.ArgumentOutOfRangeException | capacity is less than zero.-or- loadFactor is less than 0.1.-or- loadFactor is greater than 1.0. |
T:System.ArgumentException | capacity is causing an overflow. |
Definition at line 688 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | int | capacity, |
float | loadFactor, | ||
IHashCodeProvider | hcp, | ||
IComparer | comparer | ||
) |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity, load factor, hash code provider, and comparer.
capacity | The approximate number of elements that the T:System.Collections.Hashtable object can initially contain. |
loadFactor | A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets. |
hcp | The T:System.Collections.IHashCodeProvider object that supplies the hash codes for all keys in the T:System.Collections.Hashtable.-or- null to use the default hash code provider, which is each key's implementation of M:System.Object.GetHashCode. |
comparer | The T:System.Collections.IComparer object to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of M:System.Object.Equals(System.Object). |
T:System.ArgumentOutOfRangeException | capacity is less than zero.-or- loadFactor is less than 0.1.-or- loadFactor is greater than 1.0. |
Definition at line 722 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | int | capacity, |
float | loadFactor, | ||
IEqualityComparer | equalityComparer | ||
) |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity, load factor, and T:System.Collections.IEqualityComparer object.
capacity | The approximate number of elements that the T:System.Collections.Hashtable object can initially contain. |
loadFactor | A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets. |
equalityComparer | The T:System.Collections.IEqualityComparer object that defines the hash code provider and the comparer to use with the T:System.Collections.Hashtable.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of M:System.Object.GetHashCode and the default comparer is each key's implementation of M:System.Object.Equals(System.Object). |
T:System.ArgumentOutOfRangeException | capacity is less than zero.-or- loadFactor is less than 0.1.-or- loadFactor is greater than 1.0. |
Definition at line 744 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | IHashCodeProvider | hcp, |
IComparer | comparer | ||
) |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the default initial capacity and load factor, and the specified hash code provider and comparer.
hcp | The T:System.Collections.IHashCodeProvider object that supplies the hash codes for all keys in the T:System.Collections.Hashtable object.-or- null to use the default hash code provider, which is each key's implementation of M:System.Object.GetHashCode. |
comparer | The T:System.Collections.IComparer object to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of M:System.Object.Equals(System.Object). |
Definition at line 756 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | IEqualityComparer | equalityComparer | ) |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the default initial capacity and load factor, and the specified T:System.Collections.IEqualityComparer object.
equalityComparer | The T:System.Collections.IEqualityComparer object that defines the hash code provider and the comparer to use with the T:System.Collections.Hashtable object.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of M:System.Object.GetHashCode and the default comparer is each key's implementation of M:System.Object.Equals(System.Object). |
Definition at line 764 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | int | capacity, |
IHashCodeProvider | hcp, | ||
IComparer | comparer | ||
) |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity, hash code provider, comparer, and the default load factor.
capacity | The approximate number of elements that the T:System.Collections.Hashtable object can initially contain. |
hcp | The T:System.Collections.IHashCodeProvider object that supplies the hash codes for all keys in the T:System.Collections.Hashtable.-or- null to use the default hash code provider, which is each key's implementation of M:System.Object.GetHashCode. |
comparer | The T:System.Collections.IComparer object to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of M:System.Object.Equals(System.Object). |
T:System.ArgumentOutOfRangeException | capacity is less than zero. |
Definition at line 778 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | int | capacity, |
IEqualityComparer | equalityComparer | ||
) |
Initializes a new, empty instance of the T:System.Collections.Hashtable class using the specified initial capacity and T:System.Collections.IEqualityComparer, and the default load factor.
capacity | The approximate number of elements that the T:System.Collections.Hashtable object can initially contain. |
equalityComparer | The T:System.Collections.IEqualityComparer object that defines the hash code provider and the comparer to use with the T:System.Collections.Hashtable.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of M:System.Object.GetHashCode and the default comparer is each key's implementation of M:System.Object.Equals(System.Object). |
T:System.ArgumentOutOfRangeException | capacity is less than zero. |
Definition at line 789 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | IDictionary | d | ) |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the default load factor, hash code provider, and comparer.
d | The T:System.Collections.IDictionary object to copy to a new T:System.Collections.Hashtable object. |
T:System.ArgumentNullException | d is null . |
Definition at line 798 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | IDictionary | d, |
float | loadFactor | ||
) |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the specified load factor, and the default hash code provider and comparer.
d | The T:System.Collections.IDictionary object to copy to a new T:System.Collections.Hashtable object. |
loadFactor | A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets. |
T:System.ArgumentNullException | d is null . |
T:System.ArgumentOutOfRangeException | loadFactor is less than 0.1.-or- loadFactor is greater than 1.0. |
Definition at line 811 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | IDictionary | d, |
IHashCodeProvider | hcp, | ||
IComparer | comparer | ||
) |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the default load factor, and the specified hash code provider and comparer. This API is obsolete. For an alternative, see M:System.Collections.Hashtable.::ctor(System.Collections.IDictionary,System.Collections.IEqualityComparer).
d | The T:System.Collections.IDictionary object to copy to a new T:System.Collections.Hashtable object. |
hcp | The T:System.Collections.IHashCodeProvider object that supplies the hash codes for all keys in the T:System.Collections.Hashtable.-or- null to use the default hash code provider, which is each key's implementation of M:System.Object.GetHashCode. |
comparer | The T:System.Collections.IComparer object to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of M:System.Object.Equals(System.Object). |
T:System.ArgumentNullException | d is null . |
Definition at line 825 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable | ( | IDictionary | d, |
IEqualityComparer | equalityComparer | ||
) |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to a new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the default load factor and the specified T:System.Collections.IEqualityComparer object.
d | The T:System.Collections.IDictionary object to copy to a new T:System.Collections.Hashtable object. |
equalityComparer | The T:System.Collections.IEqualityComparer object that defines the hash code provider and the comparer to use with the T:System.Collections.Hashtable.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of M:System.Object.GetHashCode and the default comparer is each key's implementation of M:System.Object.Equals(System.Object). |
T:System.ArgumentNullException | d is null . |
Definition at line 836 of file Hashtable.cs.
|
protected |
Initializes a new, empty instance of the T:System.Collections.Hashtable class that is serializable using the specified T:System.Runtime.Serialization.SerializationInfo and T:System.Runtime.Serialization.StreamingContext objects.
info | A T:System.Runtime.Serialization.SerializationInfo object containing the information required to serialize the T:System.Collections.Hashtable object. |
context | A T:System.Runtime.Serialization.StreamingContext object containing the source and destination of the serialized stream associated with the T:System.Collections.Hashtable. |
T:System.ArgumentNullException | info is null . |
Definition at line 897 of file Hashtable.cs.
|
virtual |
Adds an element with the specified key and value into the T:System.Collections.Hashtable.
key | The key of the element to add. |
value | The value of the element to add. The value can be null . |
T:System.ArgumentNullException | key is null . |
T:System.ArgumentException | An element with the same key already exists in the T:System.Collections.Hashtable. |
T:System.NotSupportedException | The T:System.Collections.Hashtable is read-only.-or- The T:System.Collections.Hashtable has a fixed size. |
Implements System.Collections.IDictionary.
Definition at line 916 of file Hashtable.cs.
|
virtual |
Removes all elements from the T:System.Collections.Hashtable.
T:System.NotSupportedException | The T:System.Collections.Hashtable is read-only. |
Implements System.Collections.IDictionary.
Definition at line 924 of file Hashtable.cs.
|
virtual |
Creates a shallow copy of the T:System.Collections.Hashtable.
Implements System.ICloneable.
Definition at line 946 of file Hashtable.cs.
|
virtual |
Determines whether the T:System.Collections.Hashtable contains a specific key.
key | The key to locate in the T:System.Collections.Hashtable. |
true
if the T:System.Collections.Hashtable contains an element with the specified key; otherwise, false
.T:System.ArgumentNullException | key is null . |
Implements System.Collections.IDictionary.
Definition at line 972 of file Hashtable.cs.
|
virtual |
Determines whether the T:System.Collections.Hashtable contains a specific key.
key | The key to locate in the T:System.Collections.Hashtable. |
true
if the T:System.Collections.Hashtable contains an element with the specified key; otherwise, false
.T:System.ArgumentNullException | key is null . |
Definition at line 983 of file Hashtable.cs.
|
virtual |
Determines whether the T:System.Collections.Hashtable contains a specific value.
value | The value to locate in the T:System.Collections.Hashtable. The value can be null . |
true
if the T:System.Collections.Hashtable contains an element with the specified value ; otherwise, false
.Definition at line 1017 of file Hashtable.cs.
|
virtual |
Copies the T:System.Collections.Hashtable elements to a one-dimensional T:System.Array instance at the specified index.
array | The one-dimensional T:System.Array that is the destination of the T:System.Collections.DictionaryEntry objects copied from T:System.Collections.Hashtable. The T:System.Array must have zero-based indexing. |
arrayIndex | The zero-based index in array at which copying begins. |
T:System.ArgumentNullException | array is null . |
T:System.ArgumentOutOfRangeException | arrayIndex is less than zero. |
T:System.ArgumentException | array is multidimensional.-or- The number of elements in the source T:System.Collections.Hashtable is greater than the available space from arrayIndex to the end of the destination array . |
T:System.InvalidCastException | The type of the source T:System.Collections.Hashtable cannot be cast automatically to the type of the destination array . |
Implements System.Collections.ICollection.
Definition at line 1084 of file Hashtable.cs.
|
virtual |
Returns an T:System.Collections.IDictionaryEnumerator that iterates through the T:System.Collections.Hashtable.
Implements System.Collections.IDictionary.
Definition at line 1184 of file Hashtable.cs.
|
protectedvirtual |
Returns the hash code for the specified key.
key | The T:System.Object for which a hash code is to be returned. |
T:System.NullReferenceException | key is null . |
Definition at line 1194 of file Hashtable.cs.
|
virtual |
Implements the T:System.Runtime.Serialization.ISerializable interface and returns the data needed to serialize the T:System.Collections.Hashtable.
info | A T:System.Runtime.Serialization.SerializationInfo object containing the information required to serialize the T:System.Collections.Hashtable. |
context | A T:System.Runtime.Serialization.StreamingContext object containing the source and destination of the serialized stream associated with the T:System.Collections.Hashtable. |
T:System.ArgumentNullException | info is null . |
T:System.InvalidOperationException | The collection was modified. |
Implements System.Runtime.Serialization.ISerializable.
Definition at line 1413 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable??? | ( | IDictionary | d, |
float | loadFactor, | ||
IHashCodeProvider | hcp, | ||
IComparer | comparer | ||
) |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the specified load factor, hash code provider, and comparer.
d | The T:System.Collections.IDictionary object to copy to a new T:System.Collections.Hashtable object. |
loadFactor | A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets. |
hcp | The T:System.Collections.IHashCodeProvider object that supplies the hash codes for all keys in the T:System.Collections.Hashtable.-or- null to use the default hash code provider, which is each key's implementation of M:System.Object.GetHashCode. |
comparer | The T:System.Collections.IComparer object to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of M:System.Object.Equals(System.Object). |
T:System.ArgumentNullException | d is null . |
T:System.ArgumentOutOfRangeException | loadFactor is less than 0.1.-or- loadFactor is greater than 1.0. |
Definition at line 854 of file Hashtable.cs.
System.Collections.Hashtable.Hashtable??? | ( | IDictionary | d, |
float | loadFactor, | ||
IEqualityComparer | equalityComparer | ||
) |
Initializes a new instance of the T:System.Collections.Hashtable class by copying the elements from the specified dictionary to the new T:System.Collections.Hashtable object. The new T:System.Collections.Hashtable object has an initial capacity equal to the number of elements copied, and uses the specified load factor and T:System.Collections.IEqualityComparer object.
d | The T:System.Collections.IDictionary object to copy to a new T:System.Collections.Hashtable object. |
loadFactor | A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets. |
equalityComparer | The T:System.Collections.IEqualityComparer object that defines the hash code provider and the comparer to use with the T:System.Collections.Hashtable.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of M:System.Object.GetHashCode and the default comparer is each key's implementation of M:System.Object.Equals(System.Object). |
T:System.ArgumentNullException | d is null . |
T:System.ArgumentOutOfRangeException | loadFactor is less than 0.1.-or- loadFactor is greater than 1.0. |
Definition at line 878 of file Hashtable.cs.
|
protectedvirtual |
Compares a specific T:System.Object with a specific key in the T:System.Collections.Hashtable.
item | The T:System.Object to compare with key . |
key | The key in the T:System.Collections.Hashtable to compare with item . |
true
if item and key are equal; otherwise, false
.T:System.ArgumentNullException | item is null .-or- key is null . |
Definition at line 1211 of file Hashtable.cs.
|
virtual |
Implements the T:System.Runtime.Serialization.ISerializable interface and raises the deserialization event when the deserialization is complete.
sender | The source of the deserialization event. |
T:System.Runtime.Serialization.SerializationException | The T:System.Runtime.Serialization.SerializationInfo object associated with the current T:System.Collections.Hashtable is invalid. |
Implements System.Runtime.Serialization.IDeserializationCallback.
Definition at line 1457 of file Hashtable.cs.
|
virtual |
Removes the element with the specified key from the T:System.Collections.Hashtable.
key | The key of the element to remove. |
T:System.ArgumentNullException | key is null . |
T:System.NotSupportedException | The T:System.Collections.Hashtable is read-only.-or- The T:System.Collections.Hashtable has a fixed size. |
Implements System.Collections.IDictionary.
Definition at line 1349 of file Hashtable.cs.
Returns a synchronized (thread-safe) wrapper for the T:System.Collections.Hashtable.
table | The T:System.Collections.Hashtable to synchronize. |
T:System.ArgumentNullException | table is null . |
Definition at line 1397 of file Hashtable.cs.
virtual int System.Collections.Hashtable.Count => count |
Gets the number of key/value pairs contained in the T:System.Collections.Hashtable.
Definition at line 658 of file Hashtable.cs.
|
protected |
Gets the T:System.Collections.IEqualityComparer to use for the T:System.Collections.Hashtable.
T:System.ArgumentException | The property is set to a value, but the hash table was created using an T:System.Collections.IHashCodeProvider and an T:System.Collections.IComparer. |
Definition at line 543 of file Hashtable.cs.
virtual bool System.Collections.Hashtable.IsFixedSize => false |
Gets a value indicating whether the T:System.Collections.Hashtable has a fixed size.
true
if the T:System.Collections.Hashtable has a fixed size; otherwise, false
. The default is false
.Definition at line 607 of file Hashtable.cs.
virtual bool System.Collections.Hashtable.IsReadOnly => false |
Gets a value indicating whether the T:System.Collections.Hashtable is read-only.
true
if the T:System.Collections.Hashtable is read-only; otherwise, false
. The default is false
.Definition at line 602 of file Hashtable.cs.
virtual bool System.Collections.Hashtable.IsSynchronized => false |
Gets a value indicating whether access to the T:System.Collections.Hashtable is synchronized (thread safe).
true
if access to the T:System.Collections.Hashtable is synchronized (thread safe); otherwise, false
. The default is false
.Definition at line 612 of file Hashtable.cs.
|
getsetprotected |
Gets or sets the T:System.Collections.IComparer to use for the T:System.Collections.Hashtable.
T:System.ArgumentException | The property is set to a value, but the hash table was created using an T:System.Collections.IEqualityComparer. |
Definition at line 510 of file Hashtable.cs.
|
getsetprotected |
Gets or sets the object that can dispense hash codes.
T:System.ArgumentException | The property is set to a value, but the hash table was created using an T:System.Collections.IEqualityComparer. |
Definition at line 475 of file Hashtable.cs.
|
get |
Gets an T:System.Collections.ICollection containing the keys in the T:System.Collections.Hashtable.
Definition at line 617 of file Hashtable.cs.
|
get |
Gets an object that can be used to synchronize access to the T:System.Collections.Hashtable.
Definition at line 645 of file Hashtable.cs.
|
getset |
Gets or sets the value associated with the specified key.
key | The key whose value to get or set. |
null
, and attempting to set it creates a new element using the specified key.T:System.ArgumentNullException | key is null . |
T:System.NotSupportedException | The property is set and the T:System.Collections.Hashtable is read-only.-or- The property is set, key does not exist in the collection, and the T:System.Collections.Hashtable has a fixed size. |
Definition at line 552 of file Hashtable.cs.
|
get |
Gets an T:System.Collections.ICollection containing the values in the T:System.Collections.Hashtable.
Definition at line 631 of file Hashtable.cs.