13.07.2015 Views

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix E Documentation CommentsCharacterDescriptionEFMNPTEventFieldMethod (including constructors, destructors, and operators)NamespaceProperty (including indexers)Type (such as class, delegate, enum, interface, and struct)! Error string; the rest of the string provides information about the error. Forexample, the documentation generator generates error information for links thatcannot be resolved.• The second part of the string is the fully qualified name of the element, starting at the root of the namespace.The name of the element, its enclosing type(s), and namespace are separated by periods. If the name of theitem itself has periods, they are replaced by the NUMBER SIGN # (U+000D). (It is assumed that no elementhas this character in its name.)• For methods and properties with arguments, the argument list follows, enclosed in parentheses. For thosewithout arguments, the parentheses are omitted. The arguments are separated by commas. The encoding ofeach argument is the same as a CLI signature, as follows: Arguments are represented by their fully qualifiedname. For example, int becomes System.Int32, string becomes System.String, object becomesSystem.Object, and so on. Arguments having the out or ref modifier have a '@' following their typename. Arguments passed by value or via params have no special notation. Arguments that are arrays arerepresented as [lowerbound:size, …, lowerbound:size] where the number of commas is the rank – 1, and thelower bounds and size of each dimension, if known, are represented in decimal. If a lower bound or size isnot specified, it is omitted. If the lower bound and size for a particular dimension are omitted, the ':' isomitted as well. Jagged arrays are represented by one "[]" per level. Arguments that have pointer types otherthan void are represented using a '*' following the type name. A void pointer is represented using a type nameof "System.Void".E.3.2 ID string examplesThe following examples each show a fragment of <strong>C#</strong> code, along with the ID string produced from each sourceelement capable of having a documentation comment:• Types are represented using their fully qualified name.enum Color {Red, Blue, Green};namespace Acme{interface IProcess { /* … */ }struct ValueType { /* … */ }class Widget: IProcess{public class NestedClass { /* … */ }public interface IMenuItem { /* … */ }public delegate void Del(int i);public enum Direction {North, South, East, West};}}441

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!