My data source may have duplicate keys with values.
typeA : 1 typeB : 2 typeA : 11
I decided to use NameValueCollection , because it allows you to enter duplicate keys.
I want to remove a specific key pair \ value from the collection, but NameValueCollection.Remove(key) removes all the values associated with the specified key.
- Is there a way to remove a single key \ value
NameValueCollection from NameValueCollection , OR - Is there a better collection in C # that matches my data.
[EDIT 1]
Firstly, thanks for all the answers :)
I think I should have mentioned that my data source is XML.
I used System.Xml.Linq.XDocument to query the type, and it was also convenient to delete a specific value.
Now, my question is, for big data data, does XDocument use a good choice considering performance? If there are no other alternatives (maybe go back to NameValueCollection and use one of the methods mentioned to delete data)
Ayman source share