What is the purpose of this comment inside a region referencing the path of the dll? (System.Action)

你说的曾经没有我的故事 提交于 2019-12-12 11:24:54

问题


If I browse to the definition of System.Aciton in VS:

#region Assembly mscorlib.dll, v2.0.50727
// C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
#endregion

namespace System
{
    // Summary:
    //     Encapsulates a method that takes a single parameter and does not return a
    //     value.
    //
    // Parameters:
    //   obj:
    //     The parameter of the method that this delegate encapsulates.
    //
    // Type parameters:
    //   T:
    //     The type of the parameter of the method that this delegate encapsulates.
    public delegate void Action<T>(T obj);
}

Question: What is going on on the first line there? It looks to me almost like some kind of "hack" in place to tell something the physical path of the dll.


回答1:


This is a fake file that is automatically generated by VS using Reflection and XML doc comments.

The file path is for your own information.
It can be useful if you're referencing DLLs from different locations in different projects.



来源:https://stackoverflow.com/questions/5771356/what-is-the-purpose-of-this-comment-inside-a-region-referencing-the-path-of-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!