Linq xml updating file husband humiliation cuckolding and dating

While selecting, you can either create a dynamic object with the properties you need.

Or you can declare in advance, a class with members and create object of that class.

linq xml updating file-12linq xml updating file-87

The XElement class that use used earlier also extends XContainer, and the Element() method returns an XContainer.

We'll take advantage of that by creating a Post class with a constructor that takes an XContainer object and uses its Element() method to get values.

But you don't necessarily need to use files—once you've got your data in an XDocument object, it's all ready for querying, no matter where you got it.

Also, take a minute and open the XML file in a text editor once you've saved it out to disk.

Today I am going to show how linq can be applied on XML data along with c# code examples. I am assuming you are already familiar with basic Linq usage.