LINQ in Action roller

LINQ to XML: convert from C# to VB.net

Hi all, I am reading a book about LINQ to XML and there is an example written in C# that I haven't been able to rewrite in VB.NET. Here is the query in C# xDocument.Element("BookParticipants"). Elements("BookParticipant"). Where(e => ((string)e.Element("FirstName")) == "Ewan"). Single().AddBeforeSelf( new XElement("BookParticipant", new XAttribute("type", "Technical Reviewer"), new XElement("FirstName", "Fabio"), new XElement("LastName", "Ferracchiati"))); The problem is around the where clause. Read More...
Published Monday, March 31, 2008 7:32 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication