monodoc-xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755
  1. * MonoDoc XML Tag Reference
  2. ** Introduction
  3. <em>
  4. [This documentation is in progress. Comments to
  5. <a href="mailto:[email protected]">[email protected]</a> and/or
  6. <a href="mailto:[email protected]">[email protected]</a>.]
  7. </em>
  8. MonoDoc XML, our format for multilingual API documentation stored outside of
  9. source files, is very similar to the output of Microsoft's csc /doc. Minor
  10. alterations have been made to ease human parsing and hand-editing, but
  11. the majority of the tags are identical. In fact, many of the descriptions
  12. and examples below are taken from the ECMA C# Language Specification with
  13. little or no alteration.
  14. This document provides a list of all available MonoDoc XML tags, with
  15. syntax and examples. A complete example can be found in
  16. <a href="#appendix-a">Appendix A</a>, and both a <a href="#">DTD</a> and
  17. <a href="#">XSD schema</a> will be available very shortly.
  18. ** MonoDoc XML Tags
  19. <dl>
  20. <dt><code><a href="#c">&lt;c&gt;</a></code></dt>
  21. <dd>Mark short sections of text as code.</dd>
  22. <dt><code><code><a href="#code">&lt;code&gt;</a></code></dt></code>
  23. <dd>Mark one or more lines as code or output.</dd>
  24. <dt><code><a href="#doc">&lt;doc&gt;</a></dt></code>
  25. <dd>Root element of documentation XML.</dd>
  26. <dt><code><a href="#event">&lt;event&gt;</a></dt></code>
  27. <dd>Describe an event.</dd>
  28. <dt><code><a href="#example">&lt;example&gt;</a></dt></code>
  29. <dd>An example.</dd>
  30. <dt><code><a href="#exception">&lt;exception&gt;</a></dt></code>
  31. <dd>Specify an exception a method can throw.</dd>
  32. <dt><code><a href="#field">&lt;field&gt;</a></dt></code>
  33. <dd>Describe a field.</dd>
  34. <dt><code><a href="#list">&lt;list&gt;</a></dt></code>
  35. <dd>Create a list or table.</dd>
  36. <dt><code><a href="#method">&lt;method&gt;</a></dt></code>
  37. <dd>Describe a method.</dd>
  38. <dt><code><a href="#para">&lt;para&gt;</a></dt></code>
  39. <dd>Allow text to be structured in paragraphs.</dd>
  40. <dt><code><a href="#param">&lt;param&gt;</a></dt></code>
  41. <dd>Specify a parameter for a method.</dd>
  42. <dt><code><a href="#paramref">&lt;paramref&gt;</a></dt></code>
  43. <dd>Mark a word as a parameter.</dd>
  44. <dt><code><a href="#permission">&lt;permission&gt;</a></dt></code>
  45. <dd>Define the access level of a member.</dd>
  46. <dt><code><a href="#property">&lt;property&gt;</a></dt></code>
  47. <dd>Describe a property.</dd>
  48. <dt><code><a href="#remarks">&lt;remarks&gt;</a></dt></code>
  49. <dd>Provide verbose information for a type or member.</dd>
  50. <dt><code><a href="#returns">&lt;returns&gt;</a></dt></code>
  51. <dd>Specify the return value of a method.</dd>
  52. <dt><code><a href="#see">&lt;see&gt;</a></dt></code>
  53. <dd>Specify a link.</dd>
  54. <dt><code><a href="#seealso">&lt;seealso&gt;</a></dt></code>
  55. <dd>Specify a 'see also' entry.</dd>
  56. <dt><code><a href="#summary">&lt;summary&gt;</a></dt></code>
  57. <dd>Provide a brief (usually one sentence) description of a member or type.</dd>
  58. <dt><code><a href="#type">&lt;type&gt;</a></dt></code>
  59. <dd>Describe a type.</dd>
  60. </dl>
  61. ** Definitions and Examples
  62. *** <a name="c">&lt;c&gt;</a>
  63. This tag can be used to mark short, inline fragments of text that should
  64. be considered source code or program output. User agents should render
  65. this tag in a special -- likely monospace -- font. For larger sections,
  66. use <a href="#code"><code>&lt;code&gt;</code></a>.
  67. **** Syntax
  68. <pre>
  69. &lt;c&gt;code or output text&lt;/c&gt;
  70. </pre>
  71. **** Example
  72. <pre>
  73. &lt;remarks&gt;
  74. Class &lt;c&gt;Point&lt;/c&gt; models a point in two-dimensional space.
  75. &lt;/remarks&gt;
  76. </pre>
  77. *** <a name="code">&lt;code&gt;</a>
  78. This tag can be used to mark one or more lines of text as source code or
  79. program output. User agents should render this tag in a special (likely
  80. monospace) font, and preserve both whitespace and newlines.
  81. **** Syntax
  82. <code>&lt;code&gt;source or program output&lt;/code&gt;</code>
  83. **** Example
  84. <pre>
  85. &lt;summary&gt;
  86. This method changes the point's location by the given
  87. x- and y-offsets.
  88. &lt;example lang="C#"&gt;
  89. A C# example:
  90. &lt;code&gt;
  91. Point p = new Point(3, 5);
  92. p.Translate(-1, 3);
  93. // p == (2, 8);
  94. &lt;/code&gt;
  95. &lt;/example&gt;
  96. &lt;/summary&gt;
  97. </pre>
  98. *** <a name="doc">&lt;doc&gt;</a>
  99. This tag is the root element of the documentation file. It can contain
  100. any number of &lt;type&gt; elements.
  101. **** Syntax
  102. <code>&lt;doc lang="language" assembly="assembly"&gt;typedocs&lt;/doc&gt;</code>
  103. <blockquote>
  104. <em>lang="language"</em><br />
  105. The two-letter ISO code that specifies what language the contained
  106. documentation is written in.
  107. </blockquote>
  108. **** Example
  109. <pre>
  110. &lt;doc lang="en"&gt;
  111. &lt;type name="Graphics.Point"&gt;
  112. &lt;!-- ... --&gt;
  113. &lt;/type&gt;
  114. &lt;/doc&gt;
  115. </pre>
  116. *** <a name="event">&lt;event&gt;</a>
  117. This tag documents an event.
  118. **** Syntax
  119. <code>&lt;event name="eventname"&gt;documentation&lt;/event&gt;</code>
  120. <blockquote>
  121. <em>name="eventname"</em><br />
  122. The name of the event being documented.
  123. </blockquote>
  124. **** Example
  125. <pre>
  126. &lt;event name="Click"&gt;
  127. &lt;summary&gt;
  128. Occurs when the control is clicked.
  129. &lt;/summary&gt;
  130. &lt;data&gt;
  131. The event handler receives an argument of type EventArgs
  132. containing data related to this event.
  133. &lt;/data&gt;
  134. &lt;remarks&gt;
  135. &lt;para&gt;The ControlStyles.StandardClick style must be set
  136. for this event to be raised.&lt;/para&gt;
  137. &lt;para&gt;For more information about handling events, see
  138. Consuming Events.&lt;/para&gt;
  139. &lt;/remarks&gt;
  140. &lt;/event&gt;
  141. </pre>
  142. *** <a name="example">&lt;example&gt;</a>
  143. This tag marks a section of text as an example, and optionally specifies
  144. what programming language <code><a href="#code">&lt;code&gt;</a></code> portions of the example are written in.
  145. **** Syntax
  146. <code><example lang="language">example text and code</example></code>
  147. <blockquote>
  148. <em>lang="language"</em><br />
  149. (optional) The name of the programming language <code><a href="#code">&lt;code&gt;</a></code> blocks in this example
  150. use. This information can be used by user agents to provide
  151. intelligent access to examples in multiple languages.
  152. </blockquote>
  153. **** Example
  154. See <code><a href="#code">&lt;code&gt;<a/></code> for an example.
  155. *** <a name="exception">&lt;exception&gt;</a>
  156. This tag provides a way to specify the exceptions a method can throw.
  157. **** Syntax
  158. <code>&lt;exception cref="exception-type"&gt;description&lt;/exception&gt;</code>
  159. <blockquote>
  160. <em>cref="exception-type"</em><br />
  161. The name of an exception type.
  162. </blockquote>
  163. **** Example
  164. <pre>
  165. &lt;exception cref="System.IO.FileNotFoundException"&gt;
  166. Thrown when the requested file is not found.
  167. &lt;/exception&gt;
  168. </pre>
  169. *** <a name="field">&lt;field&gt;</a>
  170. This tag is used to describe a field.
  171. **** Syntax
  172. <code>&lt;field name="fieldname"&gt;documentation&lt;/field&gt;</code>
  173. <blockquote>
  174. <em>name="fieldname"</em><br />
  175. The name of the field being documented.
  176. </blockquote>
  177. **** Example
  178. <pre>
  179. &lt;field name="x"&gt;
  180. &lt;summary&gt;
  181. Instance variable &lt;c&gt;x&lt;/c&gt; represents the point's
  182. x-coordinate.
  183. &lt;/summary&gt;
  184. &lt;/field&gt;
  185. </pre>
  186. *** <a name="list">&lt;list&gt;</a>
  187. This tag is used to create a list or table of items. It may contain a
  188. <code>&lt;listheader&gt;</code> block to define the heading row of either a table or
  189. definition list. (When defining a table, only an entry for 'term' in the
  190. heading need be supplied.)
  191. Each item in the list is specified with an <code>&lt;item&gt;</code> block. When creating a
  192. definition list, both <code>&lt;term&gt;</code> and <code>&ltdescription&gt;</code> must be specified.
  193. However, for a table, bulleted list, or numbered list, only <code>&lt;description&gt;</code>
  194. need be specified.
  195. **** Syntax
  196. <pre>
  197. &lt;list type="bullet" | "number" | "table"&gt;
  198. &lt;listheader&gt;
  199. &lt;term&gt;term&lt;/term&gt;
  200. &lt;description&gt;description&lt;/description&gt;
  201. &lt;/listheader&gt;
  202. &lt;item&gt;
  203. &lt;term&gt;term&lt;/term&gt;
  204. &lt;description&gt;description&lt;/description&gt;
  205. &lt;/item&gt;
  206. ...
  207. &lt;/list&gt;
  208. </pre>
  209. <blockquote>
  210. <em>term</em><br />
  211. The term to define, whose definition is in <code>&lt;description&gt;</code>.
  212. <br /><br />
  213. <em>description</em><br />
  214. Either an item in a bullet or numbered list, or the definition of a <code>&lt;term&gt;</code>.
  215. </blockquote>
  216. **** Example
  217. <pre>
  218. &lt;list type="bullet"&gt;
  219. &lt;item&gt;
  220. &lt;description&gt;Item 1&lt;/description&gt;
  221. &lt;/item&gt;
  222. &lt;item&gt;
  223. &lt;description&gt;Item 2&lt;/description&gt;
  224. &lt;/item&gt;
  225. &lt;/list&gt;
  226. </pre>
  227. *** <a name="method">&lt;method&gt;</a>
  228. This tag is the overall containing tag for documenting a method.
  229. **** Syntax
  230. <code>&lt;method name="methodname"&gt;documentation&lt;/method&gt;</code>
  231. **** Example
  232. <pre>
  233. &lt;method name="op_Equality(Graphics.Point,Graphics.Point)"&gt;
  234. &lt;summary&gt;
  235. This operator determines whether two points have
  236. the same location.
  237. &lt;/summary&gt;
  238. &lt;param name="p1"&gt;
  239. &lt;c&gt;p1&lt;/c&gt; is the first Point to be compared.
  240. &lt;/param&gt;
  241. &lt;param name="p2"&gt;
  242. &lt;c&gt;p2&lt;/c&gt; is the second Point to be compared.
  243. &lt;/param&gt;
  244. &lt;returns&gt;
  245. True if the points have the same location and they
  246. have the exact same type; otherwise, false.
  247. &lt;/returns&gt;
  248. &lt;seealso cref="Equals(System.Object)" /&gt;
  249. &lt;seealso cref="op_Inequality(Graphics.Point,Graphics.Point)" /&gt;
  250. &lt;/method&gt;
  251. </pre>
  252. *** <a name="para">&lt;para&gt;</a>
  253. This tag is for use inside other tags such as <code>&lt;remarks&gt;</code> or <code>&lt;returns&gt;</code>, and
  254. allows text to be structured into paragraphs.
  255. **** Syntax
  256. <code>&lt;para&gt;text&lt;/para&gt;</code>
  257. **** Example
  258. <pre>
  259. &lt;summary&gt;
  260. &lt;para&gt;
  261. This is the entry point of the &lt;c&gt;Point&lt;/c&gt; class testing
  262. program.
  263. &lt;/para&gt;
  264. &lt;para&gt;
  265. This program tests each method and operator, and
  266. is intended to be run after any non-trivial maintenance has
  267. been performed on the &lt;c&gt;Point&lt;/c&gt; class.
  268. &lt;/para&gt;
  269. &lt;/summary&gt;
  270. </pre>
  271. *** <a name="param">&lt;param&gt;</a>
  272. This tag is used to describe a parameter for a method, constructor, or
  273. indexer.
  274. **** Syntax
  275. <code>&lt;param name="name"&gt;description&lt;/param&gt;</code>
  276. <blockquote>
  277. <em>name</em><br />
  278. The name of the parameter.
  279. </blockquote>
  280. **** Example
  281. <pre>
  282. &lt;summary&gt;
  283. This is the entry point of the &lt;c&gt;Point&lt;/c&gt;
  284. class.
  285. &lt;/summary&gt;
  286. &lt;param name="xor"&gt;&lt;c&gt;xor&lt;/c&gt; is the new x-coordinate.&lt;/param&gt;
  287. &lt;param name "yor"&gt;&lt;c&gt;yor&lt;/c&gt; is the new y-coordinate.&lt;/param&gt;
  288. </pre>
  289. *** <a name="paramref">&lt;paramref&gt;</a>
  290. This tag is used to indicate that a word is a parameter. User agents
  291. could use this information for special formatting or hyperlink insertion.
  292. **** Syntax
  293. <code>&lt;paramref name="name" /&gt;</code>
  294. <blockquote>
  295. <em>name</em><br />
  296. The name of the parameter.
  297. </blockquote>
  298. **** Example
  299. <pre>
  300. &lt;summary&gt;
  301. This constructor initializes the new Point to
  302. (&lt;paramref name="xor" /&gt;,&lt;paramref name="yor" /&gt;).
  303. &lt;/summary&gt;
  304. &lt;param name="xor"&gt;&lt;c&gt;xor&lt;/c&gt; is the new x-coordinate.&lt;/param&gt;
  305. &lt;param name "yor"&gt;&lt;c&gt;yor&lt;/c&gt; is the new y-coordinate.&lt;/param&gt;
  306. </pre>
  307. *** <a name="permission">&lt;permission&gt;</a>
  308. This tag allows the security accessibility of a member to be documented.
  309. **** Syntax
  310. <code>&lt;permission cref="member"&gt;description&lt;/permission&gt;</code>
  311. <blockquote>
  312. <em>cref="member"</em><br />
  313. The name of a member.</br>
  314. </blockquote>
  315. **** Example
  316. <pre>
  317. &lt;permission cref="System.Security.PermissionSet"&gt;
  318. Everyone can access this method.
  319. &lt;/permission&gt;
  320. </pre>
  321. *** <a name="property">&ltproperty&gt;</a>
  322. This tag is the overall containing tag for documenting a property.
  323. **** Syntax
  324. <code>&lt;property name="propertyname"&gt;documentation&lt;/property&gt;</code>
  325. <blockquote>
  326. <em>name="propertyname"</em><br />
  327. The name of the property.
  328. </blockquote>
  329. **** Example
  330. <pre>
  331. &lt;property name="X"&gt;
  332. &lt;summary&gt;
  333. Gets or sets the point's x-coordinate.
  334. &lt;value&gt;
  335. The point's x-coordinate.
  336. &lt;/value&gt;
  337. &lt;/property&gt;
  338. </pre>
  339. *** <a name="remarks">&lt;remarks&gt;</a>
  340. This tag contains extended discussion and information about a member or
  341. a type. <em>[jbarn: This differs from both the ECMA docs and
  342. portions of Microsoft's documentation, but seems consistent with both
  343. common usage, and, more importantly, NDoc convention.]</em>
  344. **** Syntax
  345. <code>&lt;remarks&gt;description&lt;/remarks&gt;</code>
  346. **** Example
  347. <pre>
  348. &lt;type name="Graphics.Point"&gt;
  349. &lt;summary&gt;
  350. Models a point in a two-dimensional plane.
  351. &lt;/summary&gt;
  352. &lt;remarks&gt;
  353. Herein I might have an extended discussion of
  354. the validity of Cartesian coordinate systems,
  355. with examples pro and con, and perhaps
  356. some code.
  357. &lt;/remarks&gt;
  358. &lt;!-- ... --&gt;
  359. &lt;/type&gt;
  360. </pre>
  361. *** <a name="returns">&lt;returns&gt;</a>
  362. This tag is used to describe the return value of a method.
  363. **** Syntax
  364. <code>&lt;returns&gt;description&lt;/returns&gt;</code>
  365. **** Example
  366. <pre>
  367. &lt;method name="op_Inequality(Graphics.Point,Graphics.Point)"&gt;
  368. &lt;summary&gt;
  369. This operator determines whether two points have the
  370. same location.
  371. &lt;/summary&gt;
  372. &lt;param name="p1"&gt;&lt;c&gt;p1&lt;/c&gt; is the first Point to be compared.&lt;/param&gt;
  373. &lt;param name="p2"&gt;&lt;c&gt;p2&lt;/c&gt; is the second Point to be compared.&lt;/param&gt;
  374. &lt;returns&gt;
  375. True if the points do not have the same location and they
  376. have the exact same type; otherwise, false.
  377. &lt;/returns&gt;
  378. &lt;/method&gt;
  379. </pre>
  380. *** <a name="see">&lt;see&gt;</a>
  381. This tag allows a link to be specified within documentation text. (Use
  382. <code>&lt;seealso&gt;</code> to indicate links that should appear in a 'See Also' section.)
  383. **** Syntax
  384. <code>&lt;see cref="destination" /&gt;</code>
  385. <blockquote>
  386. <em>cref="destination"</em><br />
  387. A destination, such as a type or a member of a type.
  388. </blockquote>
  389. **** Example
  390. <pre>
  391. &lt;summary&gt;
  392. This method changes the point's location to the given
  393. coordinates. This is an asinine way to insert a link,
  394. but &lt;see cref="Equals(Object)" /&gt; to understand
  395. how points are compared.
  396. &lt;/summary&gt;
  397. </pre>
  398. *** <a name="seealso">&lt;seealso&gt;</a>
  399. This tag allows an entry to be generated for the 'See Also' section. (Use
  400. <code>&lt;see&gt;</code> to specify a link from within text.)
  401. **** Syntax
  402. <code>&lt;seealso cref="destination" /&gt;</code>
  403. <blockquote>
  404. <em>cref="destination"</em><br />
  405. A destination, such as a type or a member of a type.
  406. </blockquote>
  407. **** Example
  408. <pre>
  409. &lt;summary&gt;
  410. This method determines whether two Points have the
  411. same location.
  412. &lt;/summary&gt;
  413. &lt;seealso cref="op_Equality(Graphics.Point,Graphics.Point)" /&gt;
  414. &lt;seealso cref="op_Inequality(Graphics.Point,Graphics.Point" /&gt;
  415. </pre>
  416. *** <a name="summary">&lt;summary&gt;</a>
  417. This tag contains a short summary of a member or type,
  418. often one sentence. <em>[jbarn: This differs from both the ECMA docs and
  419. portions of Microsoft's documentation, but seems consistent with both
  420. common usage, and, more importantly, NDoc convention.]</em>
  421. **** Syntax
  422. <code>&lt;summary&gt;description&lt;/summary&gt;</code>
  423. **** Example
  424. <pre>
  425. &lt;summary&gt;
  426. This is the entry point of the &lt;c&gt;Point&lt;/c&gt; class testing
  427. program.
  428. &lt;/summary&gt;
  429. &lt;remarks&gt;
  430. This program tests each method an operator, and is intended
  431. to be run after any non-trivial maintenance is performed
  432. on the &lt;c&gt;Point&lt;/c&gt; class.
  433. &lt;/remarks&gt;
  434. </pre>
  435. *** <a name="type">&lt;type&gt;</a>
  436. This tag is the overall containing tag for documenting a type.
  437. **** Syntax
  438. <code>&lttype name="typename" assembly="assemblyname"&gt;documentation&lt;/type&gt;</code>
  439. <blockquote>
  440. <em>name="typename"</em><br />
  441. The name of the type being documented.
  442. <br /><br />
  443. <em>assembly="assemblyname"</em><br />
  444. The assembly this type resides in. This attribute is not required for nested types.
  445. </blockquote>
  446. **** Example
  447. <pre>
  448. &lt;type name="Graphics.Point" assembly="Point"&gt;
  449. &lt;summary&gt;
  450. Models a point in two-dimensional space.
  451. &lt;/summary&gt;
  452. &lt;!-- members --&gt;
  453. &lt;field name="x"&gt;
  454. &lt;summary&gt;
  455. Represents the point's x-coordinate.
  456. &lt;/summary&gt;
  457. &lt;/field&gt;
  458. &lt;/type&gt;
  459. </pre>
  460. ** <a name="appendix-a">Appendix A: Complete Example</a>
  461. <em>[jbarn: Please, please, don't take the human-readable portions of
  462. this example to be good guidelines for writing your own documentation.
  463. this XML is intended only to show structure.]</em>
  464. <pre>
  465. &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  466. &lt;doc lang="en"&gt;
  467. &lt;type name="Graphics.Point" assembly="Point"&gt;
  468. &lt;summary&gt;
  469. Models a point in a two-dimensional plane.
  470. &lt;/summary&gt;
  471. &lt;remarks&gt;
  472. No useful remarks.
  473. &lt;/remarks&gt;
  474. &lt;!-- fields --&gt;
  475. &lt;field name="x"&gt;
  476. &lt;summary&gt;
  477. Instance variable &lt;c&gt;x&lt;/c&gt; represents the point's x-coordinate.
  478. &lt;/summary&gt;
  479. &lt;/field&gt;
  480. &lt;field name="y"&gt;
  481. &lt;summary&gt;
  482. Instance variable &lt;c&gt;y&lt;/c&gt; represents the point's y-coordinate.
  483. &lt;/summary&gt;
  484. &lt;/field&gt;
  485. &lt;!-- methods --&gt;
  486. &lt;method name="#ctor"&gt;
  487. &lt;summary&gt;
  488. Initializes the new point to &lt;c&gt;(0,0)&lt;/c&gt;.
  489. &lt;/summary&gt;
  490. &lt;/method&gt;
  491. &lt;method name="#ctor(System.Int32,System.Int32)"&gt;
  492. &lt;summary&gt;
  493. Initializes the new Point to (&lt;paramref name="xor" /&gt;,&lt;paramref name="yor" /&gt;).
  494. &lt;/summary&gt;
  495. &lt;param name="xor"&gt;&lt;c&gt;xor&lt;/c&gt; is the new x-coordinate.&lt;/param&gt;
  496. &lt;param name="yor"&gt;&lt;c&gt;yor&lt;/c&gt; is the new y-coordinate.&lt;/param&gt;
  497. &lt;/method&gt;
  498. &lt;method name="Move(System.Int32,System.Int32)"&gt;
  499. &lt;summary&gt;
  500. This method changes the point's location to the given coordinates.
  501. &lt;/summary&gt;
  502. &lt;param name="xor"&gt;&lt;c&gt;xor&lt;/c&gt; is the new x-coordinate.&lt;/param&gt;
  503. &lt;param name="yor"&gt;&lt;c&gt;yor&lt;/c&gt; is the new y-coordinate.&lt;/param&gt;
  504. &lt;seealso cref="Translate(System.Int32,System.Int32)" /&gt;
  505. &lt;/method&gt;
  506. &lt;method name="Translate(System.Int32,System.Int32)"&gt;
  507. &lt;summary&gt;This method changes the point's location by the given x- and y-offsets.&lt;/summary&gt;
  508. &lt;remarks&gt;
  509. &lt;example lang="C#"&gt;
  510. A C# example:
  511. &lt;code&gt;
  512. Point p = new Point(3, 5);
  513. p.Translate(-1, 3);
  514. &lt;/code&gt;
  515. This code results in &lt;c&gt;p&lt;/c&gt; having the value (2,8).
  516. &lt;/example&gt;
  517. &lt;/remarks&gt;
  518. &lt;param name="xor"&gt;&lt;c&gt;xor&lt;/c&gt; is the relative x-offset.&lt;/param&gt;
  519. &lt;param name="yor"&gt;&lt;c&gt;yor&lt;/c&gt; is the relative y-offset.&lt;/param&gt;
  520. &lt;seealso cref="Move(System.Int32,System.Int32)" /&gt;
  521. &lt;/method&gt;
  522. &lt;method name="Equals(System.Object)"&gt;
  523. &lt;summary&gt;This method determines whether two points have the same location.&lt;/summary&gt;
  524. &lt;param name="o"&gt;&lt;c&gt;o&lt;/c&gt; is the object to be compared to the current object.&lt;/param&gt;
  525. &lt;returns&gt;True if the Points have the same location and they have the exact same
  526. type; otherwise, false.&lt;/returns&gt;
  527. &lt;seealso cref="op_Equality(Graphics.Point,Graphics.Point)" /&gt;
  528. &lt;seealso cref="op_Inequality(Graphics.Point,Graphics.Point" /&gt;
  529. &lt;/method&gt;
  530. &lt;method name="ToString"&gt;
  531. &lt;summary&gt;Report a point's location as a string.&lt;/summary&gt;
  532. &lt;returns&gt;A string representing a point's location, in the form (x,y), without any
  533. leading, trailing, or embedded whitespace.&lt;/returns&gt;
  534. &lt;/method&gt;
  535. &lt;method name="op_Equality(Graphics.Point,Graphics.Point)"&gt;
  536. &lt;summary&gt;This operator determines whether two points have the same location.&lt;/summary&gt;
  537. &lt;param name="p1"&gt;&lt;c&gt;p1&lt;/c&gt; is the first Point to be compared.&lt;/param&gt;
  538. &lt;param name="p2"&gt;&lt;c&gt;p2&lt;/c&gt; is the second Point to be compared.&lt;/param&gt;
  539. &lt;returns&gt;True if the points have the same location and they have the exact same
  540. type; otherwise, false.&lt;/returns&gt;
  541. &lt;seealso cref="Equals(System.Object)" /&gt;
  542. &lt;seealso cref="op_Inequality(Graphics.Point,Graphics.Point)" /&gt;
  543. &lt;/method&gt;
  544. &lt;method name="op_Inequality(Graphics.Point,Graphics.Point)"&gt;
  545. &lt;summary&gt;This operator determines whether two points have the same location.&lt;/summary&gt;
  546. &lt;param name="p1"&gt;&lt;c&gt;p1&lt;/c&gt; is the first Point to be compared.&lt;/param&gt;
  547. &lt;param name="p2"&gt;&lt;c&gt;p2&lt;/c&gt; is the second Point to be compared.&lt;/param&gt;
  548. &lt;returns&gt;True if the points do not have the same location and they have the exact same
  549. type; otherwise, false.&lt;/returns&gt;
  550. &lt;seealso cref="Equals(System.Object)" /&gt;
  551. &lt;seealso cref="op_Equality(Graphics.Point,Graphics.Point)" /&gt;
  552. &lt;/method&gt;
  553. &lt;method name="Main"&gt;
  554. &lt;summary&gt;
  555. This is the entry point of the Point class testing program.
  556. &lt;/summary&gt;
  557. &lt;remarks&gt;
  558. &lt;para&gt;This program tests each method and operator, and is intended to be run after
  559. any non-trivial maintenance has been performed on the Point class.&lt;/para&gt;
  560. &lt;/remarks&gt;
  561. &lt;/method&gt;
  562. &lt;!-- properties --&gt;
  563. &lt;property name="X"&gt;
  564. &lt;value&gt;Property &lt;c&gt;X&lt;/c&gt; represents the point's x-coordinate.&lt;/value&gt;
  565. &lt;/property&gt;
  566. &lt;property name="Y"&gt;
  567. &lt;value&gt;Property &lt;c&gt;y&lt;/c&gt; represents the point's y-coordinate.&lt;/value&gt;
  568. &lt;/property&gt;
  569. &lt;/type&gt;
  570. &lt;/doc&gt;
  571. </pre>