Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I view LINQ source code? [closed]

Tags:

c#

linq

I need to write my own version of the Except method, or at least somehow modify how the LINQ one works. I'm comparing to large lists of custom objects, and need connect matches from list A to list B. I think Excepts hash table building is the fastest way to do the comparison, but the method will only return the non matches. I'm thinking if I can take a peek at how the method actually works, I can add the functionality I need.

Does anyone know where this resource is located?

like image 575
will Avatar asked Apr 20 '15 14:04

will


2 Answers

.NET source code is open source now. You can check it on GitHub. The LINQ source is here: https://github.com/dotnet/runtime/tree/master/src/libraries/System.Linq

Also of note: How does LINQ Except work?

like image 76
Bruno Brant Avatar answered Oct 07 '22 00:10

Bruno Brant


You can find most of the BCL source on the Reference Source site.

It sounds from your description that you should take a look at Enumerable.Intersect, however.

like image 29
Charles Mager Avatar answered Oct 06 '22 22:10

Charles Mager