I have a piece of code that needs some serious documenting and wanted to ask whether a feature similar to C#/.NET's In-code XML-Documentation is available for Embarcadero Delphi. My aim is to display some sort of information on how to use a specific method correctly in the manner that it'd be highlighted in the Autocompletion in Delphi XE3.
Something like this (C#):
/// <summary> /// Some useful information helping other developers use this method correctly /// </summary> public static void ADocumentedMethod();
Does Delphi XE3 support something like this?
Thank you for reading.
The feature is named XML Documentation Comments and is documented here. It appears to have been modelled closely on the equivalent .net feature so you should be right at home with it.
The documentation contains this example:
/// <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;
which results in this help insight hint:
And there are various other ways to process and consume the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With