sphinx-csharp#
sphinx-csharp is a Sphinx extension that adds a cs domain for documenting C# APIs. You describe an API in reStructuredText:
.. cs:namespace:: Geometry
.. cs:class:: public class Circle : Shape
A circle with a center and a radius.
.. cs:function:: public double Area ()
The area of the circle.
Sphinx renders it with a link for each type:
- public class Circle : Shape
A circle with a center and a radius.
- public double Area ()
The area of the circle.
You can also generate the pages from C# sources, with Doxygen and Breathe.
Installation#
Install the package from PyPI:
$ pip install sphinx-csharp
Then add the extension to the conf.py of your project:
extensions = ['sphinx_csharp']
sphinx-csharp needs Python 3.11 or later, and Sphinx 7.2 or later.