为什么我无法使用 .NET Reflector 反编译 DataRowExtensions 方法?
当我加载时
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Data.DataSetExtensions.dll
(很快将被 ILSpy 取代),然后打开 System.Data .DataRowExtensions
,当我查看方法Field
时,C#源代码只是:
public static T Field<T>(this DataRow row, DataColumn column)
{
}
我期望看到至少一行代码在这样的方法中:
return (T)row[column];
为什么该方法会像第一个代码示例中那样显示为空?
When I load
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Data.DataSetExtensions.dll
in .NET Reflector (soon to be replaced by ILSpy), and open System.Data.DataRowExtensions
, when I look at the method Field<T>(DataRow,DataColumn):T
, the C# source code is just:
public static T Field<T>(this DataRow row, DataColumn column)
{
}
I was expecting to see at least one line of code in the method like:
return (T)row[column];
Why would the method appear empty as in the first code example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
C:\Program Files\Reference Assemblies
中的程序集仅供“参考”,由 Visual Studio 用于 支持多目标。通常不包含任何实现细节,仅包含成员。与此问题和这个。
您需要加载真实的程序集才能查看实现。通常,在调试时,如果找不到程序集,您可以查看程序集所在的位置。
The assemblies in
C:\Program Files\Reference Assemblies
are for "reference" only, and are used by Visual Studio to support multi-targeting. The don't generally contain any implementation details, just the members.Similar to this question and this one.
You would need to load the real assembly to see the implementation. Generally, when debugging you can see where the assemblies are located, if you can't find them.
中看到该方法
。
I can see the method in both
.