NameValueCollection Class

Overview

  • Acts like a StringDictionary which can contain duplicate keys.
  • Values can be retrieved by key and index.

Good practice

Examples

Simple Usage

NameValueCollection valueCollection = new NameValueCollection();
 
valueCollection.Add("Key1", "Value1");
valueCollection.Add("Key1", "Value2");
valueCollection.Add("Key2", "Value3");
 
foreach (string s in valueCollection.Keys)
{
    Console.WriteLine(valueCollection[s]);
}
 
learning/exam70-536/namevaluecollection.txt · Last modified: 2008/09/16 15:48 by david
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki