wwNameValueCollection::Get

Retrieves an item from the collection and returns the item as an Key and Value pair object that has Key and Value properties.

*** Function that returns a wwNameValueCollection
loVars = GetUrlEncodedValues(lcVars)
FOR lnX = 1 TO loVars.Count
   loVar = loVars.Get(lnX)
   ? loVar.Key + " " + loVar.Value
ENDFOR

Note if you are only interested in the value or the key use the .Item() method to retrieve just the value, or the .GetKey() method to retrieve the key by index.

This method creates a new object from the results from both of these calls and returns that for you.

o.Get(lvKey)

Return Value

Returns an object with Key and Value properties or NULL of no match is found.

Parameters

lvKey
Key to retrieve from collection.

If value is numeric and you specify a key larger than the collection size an error is generated.


See also:

Class wwNameValueCollection | wwNameValueCollection::Item | wwNameValueCollection::GetKey

© West Wind Technologies, 2023 • Updated: 12/27/18
Comment or report problem with topic