LINQ beginner

    Date: 12/12/09 (C Sharp)    Keywords: no keywords

    I have a pair of LINQ "group" statements, each outputs a IEnumerable>. Call these results a and b. I want to create four collections of ints, The ones that correspond to "a.Key && b.Key", "a.Key && !b.Key", "!a.Key && b.Key", "!a.Key && !b.Key".

    I can convert a and b to Dictionaries with the ToDictionary extension method and have code like...

    var foo = from aa in aMap[true] join bb in bMap[true] on aa equals bb select aa;

    ...but then I need to check the dictionary keys exists, which is not a huge overhead but I can't help thinking there must be some way of "join"ing a and b directly...?

    Source: http://csharp.livejournal.com/105845.html

« My open source project || Writing namespace to an XML... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home