How do I create a method that takes two Dictionary & returns a Dictionary.
This method must compare the two Dictionary's & return only the ones that does not match.
Any help peeps.......
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Krivahn DossPosted Oct 2, 2008, 2:36 AM
Removing duplicates based on keys & values.
public Dictionary< int, bool> CompareDictionary(Dictionary< int, bool> newDic, Dictionary
{
Dictionary
if (newDic != null)
{
comparedDic = new Dictionary
foreach (KeyValuePair
{
if (!oldDic.Contains(new KeyValuePair
{
comparedDic.Add(kvp.Key, kvp.Value);
}
}
}
return comparedDic;
}