Tag: cref

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.

1 Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...