Re: LINQ and XML for compact framework
- From: "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx>
- Date: Thu, 1 May 2008 07:08:47 -0700 (PDT)
On May 1, 2:54 pm, Wan <luo...@xxxxxxxxx> wrote:
<snip>
'msgs' is empty. There is two possiblities here.
1) from el in root.Descendants("Message")
where el.Element("MessageID").Value == MsgID
select el;
This LINQ statement is not working.
Right. What happens if you remove the where clause? Is it successfully
finding the messages themselves when unfiltered? That would also
verify that it's managed to load the document appropriately.
2) After the LINQ found the records, it fail to copy the value to
IEnumerable<XElement> msgs
That's just assignment - pretty unlikely to fail.
As I said, I have tested this code and same LINQ statement on a
desktop console application. It works fine.
Sure. The trick is narrowing down where the difference is :)
Jon
.
- Follow-Ups:
- Re: LINQ and XML for compact framework
- From: Wan
- Re: LINQ and XML for compact framework
- References:
- Re: LINQ and XML for compact framework
- From: Jon Skeet [C# MVP]
- Re: LINQ and XML for compact framework
- From: Wan
- Re: LINQ and XML for compact framework
- From: Jon Skeet [C# MVP]
- Re: LINQ and XML for compact framework
- From: Wan
- Re: LINQ and XML for compact framework
- From: Jon Skeet [C# MVP]
- Re: LINQ and XML for compact framework
- From: Wan
- Re: LINQ and XML for compact framework
- From: Jon Skeet [C# MVP]
- Re: LINQ and XML for compact framework
- From: Wan
- Re: LINQ and XML for compact framework
- From: Jon Skeet [C# MVP]
- Re: LINQ and XML for compact framework
- From: Wan
- Re: LINQ and XML for compact framework
- Prev by Date: Need some graphical advice
- Next by Date: Re: Need some graphical advice
- Previous by thread: Re: LINQ and XML for compact framework
- Next by thread: Re: LINQ and XML for compact framework
- Index(es):
Relevant Pages
|