Let's say I have an XML file that looks like this:
<?xml version="1.0" encoding="utf-8"?> <Customers> <Customer Name="Jason Voorhees" WeaponPurchased="Machette" SalePrice="499.90" /> <Customer Name="Michael Myers" WeaponPurchased="Kitchen Knife" SalePrice="96.75" /> </Customers>
Is it possible, with Linq, to do something like this :?
foreach customer in Customers select WeaponPurchased where Name equals "Jason Voorhees"
or
foreach customer in Customers select customer label1.Text += "Name: " + customer.Name + Environment.NewLine + "WeaponPurchased: " + customer.WeaponPurchased;
I have seen this type of request before on MSDN, but the links in my favorites now lead to the wrong page, and I'm still trying to find these specific examples. Any help is greatly appreciated
thanks
source share