C# ASP.NET SQL SERVER
  • Tue
    07
    Oct 08

    LINQ to XML Notes

    Some notes on LINQ to XML All LINQ to XML objects inherit from XObject. All LINQ to XML objects except XAttribute inherit from XNode which directly inherits from XObject. Using XDocument is optional. (XDocument wraps an XElement object and adds to it.) Both XDocument and XElement have static methods...

    Continue reading "LINQ to XML Notes"

  • Tue
    19
    Aug 08

    Hashtable keys intersect with list of Int32

    The problem: You have a classic Hashtable. Although the keys are strings they hold only ints. You also have a list of ints. You want to find out if any of the keys from the Hashtable are in the list of ints. How do you do this in one line of LINQ? The solution, using LINQ, that I came up with is: //...

    Continue reading "Hashtable keys intersect with list of Int32"