B
Bernie Walker
Can an individual value be changed or must the entire collection for a
specific key be cleared and re added?
Bernie.
specific key be cleared and re added?
Bernie.
Nicholas Paldino said:Bernie,
You should just be able to do this:
// pobjNameValueCollection is the NameValueCollection instance.
pobjNameValueCollection["key"] = "new value";
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Bernie Walker said:Can an individual value be changed or must the entire collection for a
specific key be cleared and re added?
Bernie.
Bernie Walker said:Lets say I have:
NameValueCollection nvc = new NameValueCollection():
nvc.Add("Saying","Apples");
nvc.Add("Saying","Peaches");
nvc.Add("Saying","Pumpkin Pie");
now I want to change the value of 'Pumpkin Pie' to 'Cherry Pie' for the key
'Saying'
Is there a way to access the third value of the key and change it?
Bernie.
message news:[email protected]...Bernie,
You should just be able to do this:
// pobjNameValueCollection is the NameValueCollection instance.
pobjNameValueCollection["key"] = "new value";
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Bernie Walker said:Can an individual value be changed or must the entire collection for a
specific key be cleared and re added?
Bernie.