S
shapper
Hello,
I am querying a XDocument as follows:
Boolean test = true;
IEnumerable<XElement> test1 = _albums.Root.Elements("Album").Where(a
=> a.Element("Active").Value == test.ToString());
IEnumerable<XElement> test2 = _albums.Root.Elements("Album").Where(a
=> a.Element("Active").Value == "true");
The first one where I use test.ToString() I get an empty enumeration.
On the second one where I use "true" I get 4 items.
What am I missing?
Thanks,
Miguel
I am querying a XDocument as follows:
Boolean test = true;
IEnumerable<XElement> test1 = _albums.Root.Elements("Album").Where(a
=> a.Element("Active").Value == test.ToString());
IEnumerable<XElement> test2 = _albums.Root.Elements("Album").Where(a
=> a.Element("Active").Value == "true");
The first one where I use test.ToString() I get an empty enumeration.
On the second one where I use "true" I get 4 items.
What am I missing?
Thanks,
Miguel