Re: LINQ and XML for compact framework
- From: "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx>
- Date: Thu, 1 May 2008 09:41:28 -0700 (PDT)
On May 1, 4:39 pm, Wan <luo...@xxxxxxxxx> wrote:
The exception was thrown inside the foreach statement.
Hang on - you said before that it wasn't getting inside the foreach
statement. You said that "msgs" was empty - which means it wouldn't be
trying to set the value.
Which is it?
After it excute
el.Element("MessageStaus").SetValue(newStatus.ToString());
this line of code, the exception was fired.
After it executed that, or during the execution? My guess is that
el.Element("MessageStaus") is returning null, but you really need to
make sure your diagnostics are consistent before you go any further.
If it *is* going into the foreach loop, work out why you thought it
wasn't.
Then look at "el" (again, with a message box or something similar) to
see whether it really does have a MessageStaus element.
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: 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
- From: Jon Skeet [C# MVP]
- Re: LINQ and XML for compact framework
- From: Wan
- Re: LINQ and XML for compact framework
- Prev by Date: Re: Retrieving form data from an asp page
- Next by Date: Validate XML data before DataSet.Read - httpRequest
- Previous by thread: Re: LINQ and XML for compact framework
- Next by thread: Re: LINQ and XML for compact framework
- Index(es):
Relevant Pages
|