#NameDistinctValueCollection
##Properties
| Datatype | Property name | Property description | Default Value |
|---|---|---|---|
| String[] | AllKeys | Gets all the keys in the System.Collections.Specialized.NameValueCollection. | [] |
| Int32 | Count | Gets the number of key/value pairs contained in the System.Collections.Specialized.NameObjectCollectionBase instance. | 0 |
| String | Item | null | |
| String | Item | null | |
| KeysCollection | Keys | Gets a System.Collections.Specialized.KeysCollection instance that contains all the keys in the System.Collections.Specialized.NameObjectCollectionBase instance. | {} |
##Methods
###Add(System.String,System.String) Adds a new item to the end of the collection with the specified System.String key and value.
Parameters:
- System.String name - The key that will be used to identify this item. If the key already exists, the value will be overwritten.
- System.String value - The System.String value to be associated with the key.
###Add(System.Collections.Specialized.NameValueCollection) Copies the entries in the specified System.Collections.Specialized.NameValueCollection to the current System.Collections.Specialized.NameValueCollection.
Parameters:
- System.Collections.Specialized.NameValueCollection c - The System.Collections.Specialized.NameValueCollection to copy to the current System.Collections.Specialized.NameValueCollection.
###Clear() Invalidates the cached arrays and removes all entries from the System.Collections.Specialized.NameValueCollection.
###CopyTo(System.Array,System.Int32) Copies the entire System.Collections.Specialized.NameValueCollection to a compatible one-dimensional System.Array, starting at the specified index of the target array.
Parameters:
- System.Array dest - The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Specialized.NameValueCollection. The System.Array must have zero-based indexing.
- System.Int32 index - The zero-based index in
###Equals(System.Object) Determines whether the specified System.Object is equal to the current System.Object.
Parameters:
- System.Object obj - The System.Object to compare with the current System.Object.
Returns:
true if the specified System.Object is equal to the current System.Object; otherwise, false.
###Get(System.String) Gets the values associated with the specified key from the System.Collections.Specialized.NameValueCollection combined into one comma-separated list.
Parameters:
- System.String name - The System.String key of the entry that contains the values to get. The key can be null.
Returns:
A System.String that contains a comma-separated list of the values associated with the specified key from the System.Collections.Specialized.NameValueCollection, if found; otherwise, null.
###Get(System.Int32) Gets the values at the specified index of the System.Collections.Specialized.NameValueCollection combined into one comma-separated list.
Parameters:
- System.Int32 index - The zero-based index of the entry that contains the values to get from the collection.
Returns:
A System.String that contains a comma-separated list of the values at the specified index of the System.Collections.Specialized.NameValueCollection, if found; otherwise, null.
###GetEnumerator() Returns an enumerator that iterates through the System.Collections.Specialized.NameObjectCollectionBase.
Returns:
An System.Collections.IEnumerator for the System.Collections.Specialized.NameObjectCollectionBase instance.
###GetHashCode() Serves as a hash function for a particular type.
Returns:
A hash code for the current System.Object.
###GetKey(System.Int32) Gets the key at the specified index of the System.Collections.Specialized.NameValueCollection.
Parameters:
- System.Int32 index - The zero-based index of the key to get from the collection.
Returns:
A System.String that contains the key at the specified index of the System.Collections.Specialized.NameValueCollection, if found; otherwise, null.
###GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) Implements the System.Runtime.SerializationISerializable interface with the data needed to serialize the AdHoc.NameDistinctValueCollection instance.
Parameters:
- System.Runtime.Serialization.SerializationInfo info - The serialized information of the AdHoc.Collections.NameDistinctValueCollection.
- System.Runtime.Serialization.StreamingContext context - The source and destination context in which the collection should be obtained. Null signifies no context.
###GetType() Gets the System.Type of the current instance.
Returns:
The System.Type instance that represents the exact runtime type of the current instance.
###GetValues(System.String) Gets the values associated with the specified key from the System.Collections.Specialized.NameValueCollection.
Parameters:
- System.String name - The System.String key of the entry that contains the values to get. The key can be null.
Returns:
A System.String array that contains the values associated with the specified key from the System.Collections.Specialized.NameValueCollection, if found; otherwise, null.
###GetValues(System.Int32) Gets the values at the specified index of the System.Collections.Specialized.NameValueCollection.
Parameters:
- System.Int32 index - The zero-based index of the entry that contains the values to get from the collection.
Returns:
A System.String array that contains the values at the specified index of the System.Collections.Specialized.NameValueCollection, if found; otherwise, null.
###HasKeys() Gets a value indicating whether the System.Collections.Specialized.NameValueCollection contains keys that are not null.
Returns:
true if the System.Collections.Specialized.NameValueCollection contains keys that are not null; otherwise, false.
###OnDeserialization(System.Object) Implements the System.Runtime.Serialization.ISerializable interface and raises the deserialization event when the deserialization is complete.
Parameters:
- System.Object sender - The source of the deserialization event.
###Remove(System.String) Removes the entries with the specified key from the System.Collections.Specialized.NameObjectCollectionBase instance.
Parameters:
- System.String name - The System.String key of the entry to remove. The key can be null.
###Set(System.String,System.String) Sets the value of an entry in the System.Collections.Specialized.NameValueCollection.
Parameters:
- System.String name - The System.String key of the entry to add the new value to. The key can be null.
- System.String value - The System.Object that represents the new value to add to the specified entry. The value can be null.
###ToString() Returns a System.String that represents the current System.Object.
Returns:
A System.String that represents the current System.Object.
