Where is the List<T> implementation? #41564
-
I see the class from System.Collections.cs but I don't see any code at all. Am I missing something silly here? thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You are looking at the reference assembly for Even though |
Beta Was this translation helpful? Give feedback.
-
Side note: .NET Source Browser is a helpful web-app for this --> https://source.dot.net/#q=List%3CT%3E |
Beta Was this translation helpful? Give feedback.
You are looking at the reference assembly for
System.Collections
. The reference assembly lives under theref
directory and does not actually provide any code for the classes. The source for the implementation assembly, which will actually contain the code, lives under thesrc
directory. You can read more about what reference assemblies are used for in the documentation.Even though
List<T>
is defined in the reference assembly forSystem.Collections
, it does not actually live in the implementation assembly forSystem.Collections
. It actually lives inSystem.Private.CoreLib
, which is the "root assembly" where types likeSystem.Object
are defined. You can find the file for List at\src\libra…