The compiler generates an ID string for each construct in your code that is tagged to generate documentation. (For information on how to tag your code, see Tags for Documentation Comments.) The ID string uniquely identifies the construct. Programs that process the XML file can use the ID string to identify the corresponding NGWS metadata/reflection item that the documentation applies to.
The compiler observes the following rules when it generates the ID strings:
Character | Description |
---|---|
N | namespace |
T | type: class, interface, struct, enum, delegate |
F | field |
P | property (including indexers or other indexed properties) |
M | method (including such special methods as constructors, operators, and so on) |
E | event |
! | error string; the rest of the string provides information about the error. The C# compiler generates error information for links that cannot be resolved. |
The following signature components are not represented because they are never used for differentiating overloaded methods:
The following examples show how the ID strings for a class and its members would be generated:
namespace N // "N:N" { class X // "T:N.X" { X(); // "M:N.X.#ctor" static X(); // "M:N.X.#cctor" a class constructor X(int); // "M:N.X.#ctor(System.Int32)" ~X(); // "M:N.X.Finalize" destructor's representation in metadata string q; // "F:N.X.q" const double PI = 3.14; // "F:N.X.PI" int f(); // "M:N.X.f" int bb(string s, ref int y, void * z); // "M:N.X.bb(System.String,System.Int32@,=VOID*)" int gg(short[] array1, int[,] array); // "M:N.X.gg(System.Int16[], System.Int32[0:,0:])" X operator+(X, X); // "M:N.X.op_Addition(N.X,N.X)" int prop {get; set;} // "P:N.X.prop" event MyDelegate d; // "E:N.X.d" int this[string s]; // "P:N.X.Item(System.String)" class Nested{} // "T:N.X.Nested" delegate void D(int i); // "T:N.X.D" explicit operator int(X x); // "M:N.X.op_Explicit(N.X)~System.Int32" } }