.netframework源码查看

原创
2021/04/29 09:02
阅读数 57

通过此网站http://referencesource.microsoft.com/)可以直接查询基于.net framework4.6的源码

也可以下载到本地通过VS 查看。

Browse the .NET Framework source code online, with search and navigation powered by Roslyn.

See details at the .NET Framework blog.

How to configure Visual Studio for debugging .NET framework

Find type and member declarations, files, assemblies and GUIDs

Search for: Examples
Full or partial type or member name.
The string needs to be a prefix, "Builder" won't find "StringBuilder", but will find "BuilderType".
Use quotes to find exact string (turns off prefix search).
Use "assembly" prefix to search for assembly names.
Use a keyword to filter by member type:
assembly,   type,   class,   struct,   interface,   enum,   delegate,   method,   property,   event,   field,   file
Add words separated by space to filter results to only those that contain all of the words. Can also filter by assembly name.
Find .cs or .vb files.
Find projects by path.
Find GUIDs mentioned in string literals.

Easy hyperlinks to files, types, members, projects/assemblies

When viewing the source code in a file, two links at the bottom provide shortcuts to the current file and the current assembly.

Click on a line number to get a hyperlink to that particular line.

Feature Example
Link to assembly /#System.Core
Link to file /#mscorlib/system/environment.cs
Link to line number /#mscorlib/system/environment.cs#56
Link to a type/member /mscorlib/a.html#1f55292c3174123d (right-click the definition and choose Copy Shortcut)
Link to search results /#q=Button%20PresentationFramework

Features

Feature Description
Go To Definition Click any identifier to go to definition.
Find All References Click the symbol name in definition to find all references. Find References also shows derived types, interface implementations, base members, overriding and overridden members, class instantiations and field or property writes separately.
Highlight References Click on a local variable, parameter or type parameter to highlight all references inline in source.
Document Outline In the document view, show the list of types and members in the file.
Project Explorer Display the tree view of files in the current project/assembly. References and Used By folders list dependent and depending assemblies (not available for mscorlib).
Namespace Explorer Namespaces and types in the current project/assembly.
展开阅读全文
加载中

作者的其它热门文章

打赏
0
0 收藏
分享
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部
返回顶部
顶部