how to compair a dictionary memeber of a class with an other

  • Thread starter Thread starter rajemessage
  • Start date Start date
R

rajemessage

Guest
public class RootObject1
{

public Dictionary<string, string> nodeHierarchy { get; set; }
public Dictionary<string, string> Parentnode { get; set; }




}

List<RootObject1> ro = new List<RootObject1>();
RootObject1 ro1 = new RootObject1
{
nodeHierarchy = new Dictionary<string, string>
{
{ "l1", "x" },{"l2", "x" }
}
};

ro.Add(ro1);

Dictionary<string, string> di = new Dictionary<string, string>();
di.Add("l1", "x");
di.Add("l2", "x");

var x = ro.Where(w => w.nodeHierarchy == di);

// follwing is not compairing pls suggest


yours scincerly

Continue reading...
 
Back
Top