Gets the value of the first entry with the specified key from the System.Collections.Specialized.NameObjectCollectionBase instance.
- name
- The string key of the entry to get. The key can be null.
An object that represents the value of the first entry with the specified key, if found; otherwise, null.
If the collection contains multiple entries with the specified key, this method returns only the first entry. To get the values of subsequent entries with the same key, use the enumerator to iterate through the collection and compare the keys.
This method returns null in the following cases: 1) if the specified key is not found; and 2) if the specified key is found and its associated value is null. This method does not distinguish between the two cases.
This method is an O(1) operation.