Delphi中的注释方法?

Delphi中的注释方法?,delphi,documentation,xml-documentation,Delphi,Documentation,Xml Documentation,我有一段代码需要认真编写文档,我想问一下Embarcadero Delphi是否有类似于C#/.NET的代码XML文档中的功能。 我的目标是显示一些关于如何正确使用特定方法的信息,这些信息将在Delphi XE3的自动完成中突出显示 像这样的事情(C#): // ///一些有用的信息可以帮助其他开发人员正确使用此方法 /// 公共静态无效ADocumentedMethod(); Delphi XE3支持这样的东西吗 感谢阅读。该功能名为XML Documentation Comments,非

我有一段代码需要认真编写文档,我想问一下Embarcadero Delphi是否有类似于C#/.NET的代码XML文档中的功能。 我的目标是显示一些关于如何正确使用特定方法的信息,这些信息将在Delphi XE3的自动完成中突出显示

像这样的事情(C#):

//
///一些有用的信息可以帮助其他开发人员正确使用此方法
/// 
公共静态无效ADocumentedMethod();
Delphi XE3支持这样的东西吗

感谢阅读。

该功能名为XML Documentation Comments,非常有用。它似乎是以等效的.net功能为模型的,因此您应该对它非常熟悉

文档包含以下示例:

/// <summary> Removes the specified item from the collection
/// </summary>
/// <param name="Item">The item to remove
/// </param>
/// <param name="Collection">The group containing the item
/// </param>
/// <remarks>
/// If parameter "Item" is null, an exception is raised.
/// <see cref="EArgumentNilException"/>
/// </remarks>
/// <returns>True if the specified item is successfully removed;
/// otherwise False is returned.
/// </returns>
function RemoveItem(Item: Pointer; Collection: Pointer): Boolean;
begin
  // Non-XML DOC comment
  // ...
end;
///从集合中删除指定的项
/// 
///要删除的项目
/// 
///包含该项的组
/// 
/// 
///如果参数“Item”为null,则引发异常。
/// 
/// 
///如果成功删除指定项,则为True;
///否则返回False。
/// 
函数RemoveItem(项:指针;集合:指针):布尔值;
开始
//非XML文档注释
// ...
结束;
这将导致此帮助提示:


还有其他各种处理和使用文档的方法。

您有哪种版本的Delphi XE3?请您将这些信息包括在您的问题中,好吗?@TLama不应该真的很重要,因为///XML文档自2010年起就可以使用,所有SKU,尽管看起来有点问题…@ain,我说的是,据我所知,在Delphi的廉价发行版中有很大的限制,不是吗?它在Delphi 2009中起作用,我也是。这太完美了!非常感谢你!我觉得有点愚蠢,因为我在谷歌上没有找到这个。此外,这个XML文档应该出现在单元的
接口
部分,以便在外部单元中显示。注意,您也可以用于例外情况。问题是,洞察提示中没有显示异常名称(cref)。(10.3里约)。
/// <summary> Removes the specified item from the collection
/// </summary>
/// <param name="Item">The item to remove
/// </param>
/// <param name="Collection">The group containing the item
/// </param>
/// <remarks>
/// If parameter "Item" is null, an exception is raised.
/// <see cref="EArgumentNilException"/>
/// </remarks>
/// <returns>True if the specified item is successfully removed;
/// otherwise False is returned.
/// </returns>
function RemoveItem(Item: Pointer; Collection: Pointer): Boolean;
begin
  // Non-XML DOC comment
  // ...
end;