Runtime: Generic List<T> source code in System.Collections.Generic?

Created on 24 Jul 2015  路  11Comments  路  Source: dotnet/runtime

Hi, I'm looking for source code of the Generic List class but can't find it in the folder https://github.com/dotnet/corefx/tree/master/src/System.Collections/src/System/Collections/Generic

There are test cases but the code itself is not present in the folder mentioned above.

Most helpful comment

While technically this isn't an issue, the response provided is no longer correct. It has been moved here: https://github.com/dotnet/coreclr/blob/master/src/mscorlib/shared/System/Collections/Generic/List.cs

edit: Actually, there is a new link here https://github.com/dotnet/coreclr/blob/master/src/System.Private.CoreLib/shared/System/Collections/Generic/List.cs

All 11 comments

List, along with some of the other types in System.Collections.Generic, are implemented in mscorlib, here:

https://github.com/dotnet/coreclr/blob/master/src/mscorlib/src/System/Collections/Generic/List.cs

@mellinoe Thank you!

While technically this isn't an issue, the response provided is no longer correct. It has been moved here: https://github.com/dotnet/coreclr/blob/master/src/mscorlib/shared/System/Collections/Generic/List.cs

edit: Actually, there is a new link here https://github.com/dotnet/coreclr/blob/master/src/System.Private.CoreLib/shared/System/Collections/Generic/List.cs

In general, just press T while on the repo's home page and type List.cs. If it doesn't appear in the search results, try it at the other repo's home page.

@jnm2 didn't know that useful one, thanks for sharing!

New thing I learned last week: go to http://source.dot.net, type List<, click the top entry, then click the 'Web聽Access' link in the bottom right corner.

Ah! kewwl!
BTW, I have source.dot.net as a Chrome search engine, so I just type so in the address bar, and hit Tab to search.

Both links provided in the answers are broken.

Thank you very much.

Was this page helpful?
0 / 5 - 0 ratings