Re: LINQ and XML for compact framework
- From: Wan <luowan@xxxxxxxxx>
- Date: Thu, 1 May 2008 05:27:08 -0700 (PDT)
On May 1, 1:07 pm, "Jon Skeet [C# MVP]" <sk...@xxxxxxxxx> wrote:
On May 1, 12:43 pm, Wan <luo...@xxxxxxxxx> wrote:
I think it is complete,
No, it's definitely not.
Please create a windows application project
with smart device. Put the code under Form.cs. I don't think you
need to implement a 'Main'.
Only because Visual Studio creates another file for you that *does*
contain Main. Likewise the Form1.Designer.cs file contains
InitializeComponent. Without that, it's not complete.
In short, I can't cut and paste the code into a text editor *on its
own* and compile from the command line, which is what I tend to do
with newsgroup posts. Again, please readhttp://pobox.com/~skeet/csharp/incomplete.html
You also *still* haven't said how it behaves differently to how you
expect it to.
Jon
Ok, I am not sure if you complie it from command line will help to see
the problem. As the program was complied with no errors.
I expect this piece of code can go to the XML I pasted, and find the
element as well as changing the value. However, it didn't changed
value. even though it found the XML file, loaded XML, ran the LINQ
statement. Finally when I check the value of "IEnumerable<XElement>
msgs" by watching this variable. It will give me such error message:
msgs.System.Collections.Generic.IEnumerator<TSource>.Current
'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'
does not contain a definition for 'System' and no extension method
'System' accepting a first argument of type
'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'
could be found (are you missing a using directive or an assembly
reference?)
I assume, it might be problem of 'System.Collections.Generic' for
compact framework, does not support the XElement type.
.
- Follow-Ups:
- Re: LINQ and XML for compact framework
- From: Jon Skeet [C# MVP]
- 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
- Prev by Date: Re: Why C# (Visual studio) development is more troublesome
- Next by Date: Re: LINQ and XML for compact framework
- Previous by thread: Re: LINQ and XML for compact framework
- Next by thread: Re: LINQ and XML for compact framework
- Index(es):
Relevant Pages
|
Loading