I have two dictionaries and I want to compare it against each other and they are of type Dictionary>
I tried using a foreach loop but it won't work exactly as desired.What's the best way to go about it?
foreach (KeyValuePair<string, Dictionary<string, object>> entry1 in dict1)
{
foreach (KeyValuePair<string, Dictionary<string, object>> entry2 in dict2)
{
if (entry1.key = entry2.key)
{
if (entry1.Value["Number"]==entry2.Value["Number"])
{
Console.WriteLine("Comparison successful")
}
}
}
}