X hits on this document

1052 views

0 shares

0 downloads

0 comments

357 / 396

C# LANGUAGE SPECIFICATION

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 the item itself has periods, they are replaced by # (U+0023) characters. (It is assumed that no element has this character in its name.)

For methods and properties with arguments, the argument list follows, enclosed in parentheses. For those without arguments, the parentheses are omitted. The arguments are separated by commas. The encoding of each argument is the same as a CLI signature, as follows: Arguments are represented by their fully qualified name. For example, int becomes System.Int32, string becomes System.String, object becomes System.Object, and so on. Arguments having the out or ref modifier have an @ following their type name. Arguments passed by value or via params have no special notation. Arguments that are arrays are represented as [ lowerbound : size ,, lowerbound : size ] where the number of commas is the rank less one, and the lower bounds and size of each dimension, if known, are represented in decimal. If a lower bound or size is not specified, it is omitted. If the lower bound and size for a particular dimension are omitted, the “:” is omitted as well. Jagged arrays are represented by one “[]” per level. Arguments that have pointer types other than void are represented using a * following the type name. A void pointer is represented using a type name of System.Void.

A.3.2

ID string examples

The following examples each show a fragment of C# code, along with the ID string produced from each source element 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 } } }

"T:Color" "T:Acme.IProcess" "T:Acme.ValueType" "T:Acme.Widget" "T:Acme.Widget.NestedClass" "T:Acme.Widget.IMenuItem" "T:Acme.Widget.Del" "T:Acme.Widget.Direction"

Fields are represented by their fully qualified name.

344Copyright Microsoft Corporation 1999-2003. All Rights Reserved.

Document info
Document views1052
Page views1052
Page last viewedSat Dec 10 14:54:52 UTC 2016
Pages396
Paragraphs9401
Words133190

Comments