Re: Confused by the NameValueCollection
From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 05/13/04
- Next message: Eliyahu Goldin: "Re: security considertations in deploying asp.net web apps"
- Previous message: Rick Spiewak: "Re: Page output display must be refreshed?"
- In reply to: anon: "Confused by the NameValueCollection"
- Next in thread: Teemu Keiski: "Re: Confused by the NameValueCollection"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 May 2004 13:55:37 +0200
Example 2.
NameValueCollection nvc=new NameValueCollection();
nvc.Add("A","Alpha");
nvc.Add("B","Beta");
nvc.Add("C","Charlie");
nvc.Add("C","Chumpkin");
for(int n=0; n<nvc.Count; n++)
Console.WriteLine(nvc[n]);
foreach(string s in nvc.Keys)
Console.WriteLine(nvc[s]);
-- Bob Powell [MVP] Visual C#, System.Drawing Image transition effects, automatic persistent configuration and design time mouse operations all in April's issue of Well Formed http://www.bobpowell.net/wellformed.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/gdiplus_faq.htm The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml Bob's Blog: http://royo.is-a-geek.com/siteFeeder/GetFeed.aspx?FeedId=41 "anon" <anon@hotmail.com> wrote in message news:uksCPmMOEHA.892@TK2MSFTNGP09.phx.gbl... > I need a little clarity in the NameValueCollection. > > Within the MSDN .NET 1.1 Framework help is says: > > "This collection is based on the NameObjectCollectionBase class. > However, unlike the > NameObjectCollectionBase, this class stores multiple string values under > a single key." > > > > What does this REALLY MEAN? > > IS THIS CORRECT WAY? > EXAMPLE #1 > Index Key Value > 0 a "alpha" > 1 b "beta" > 2 c "charlie" > 3 c "clifford" > > > OR does it mean > EXAMPLE #2 > Index Key Value > 0 a "alpha" > 1 b "beta" > 2 c "charlie", "clifford" > > > see how I am confused? > > > >
- Next message: Eliyahu Goldin: "Re: security considertations in deploying asp.net web apps"
- Previous message: Rick Spiewak: "Re: Page output display must be refreshed?"
- In reply to: anon: "Confused by the NameValueCollection"
- Next in thread: Teemu Keiski: "Re: Confused by the NameValueCollection"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|