Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 698
Aaron Anodide Avatar asked Jan 19 '23 22:01

Aaron Anodide


1 Answers

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.

like image 68
SLaks Avatar answered Jan 22 '23 12:01

SLaks