9

I was searching for the source code of .NET Core because I wanted to look at how the core classes are implemented. For example, I wanted to see how the string class is written. Can someone please point me to the source code of .NET Core?

There exists a great online browsing tool for .NET Framework at .NET Reference Resource. Does something similar exist for .NET Core?

PS: I tried looking on GitHub but could not find it.

This GitHub Link allows to download SDK source code but it has missing classes like String.cs

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
ihimv
  • 1,308
  • 12
  • 25

2 Answers2

20

The equivalent of the .NET Framework Referece Source website for Core is .NET Source Browser.

Where you can find String.

MIT Licensed.

  • 2
    The .NET Source Browser is great resource, but its for the NEXT version of .NET 7. Is there an option or other resource for *current* version ( .NET 6 as for today ) ? – TPAKTOPA Feb 18 '22 at 08:55
3

Look in the dotnet/runtime repo on GitHub:

You'll find the implementation of the String class there: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/String.cs

mm8
  • 163,881
  • 10
  • 57
  • 88