Tag: comment
XML Comments
by Warlock on Nov.24, 2009, under .NET, C#, Visual Studio
Today I was looking for a reference for the proper notation for the cref attribute of the <see cref="..."> C# XML comment tag, and after finding it, I thought I’d post it here for future reference.
The cref (code reference) tag is prefaced by a single character, then a colon, followed by the reference in question. The character defines what is being referenced, as defined by the table below.
| Character | Description |
|---|---|
| N | Namespace |
| T | Type (class, interface, struct, enum, delegate) |
| F | Field (member variable, constant, etc) |
| P | Property (including indexers and indexed properties) |
| M | Method (including special methods like constructors – #ctor – operators, etc) |
| E | Event |
| ! | Error string |
The full reference for the prefixes is available here, with the full XML comment documentation available here. The Code Project also has an article on the topic.