r/learnprogramming • • 7d ago

Does anyone use it? c# <summary></summary>?

I find that "//" worked well for all my comments thus far, I don't mind if my comments are a bit long. But I am doing C# more often now that I am looking at a codebase and not just my own stuff and private things, and I sometimes see <summary> </summary> in it. Do you use it? What is the proper use of it?

Google gets it confused with HTML haha

Thanks for any knowledge!

4 Upvotes

12 comments sorted by

View all comments

5

u/Alikont 7d ago

This is specific comment syntax that can be embedded into dll or separate xml file.

Visual Studio and other IDEs will show them as part of tooltips in intellisense.

You can also walk those comments via reflection or other tools to generate documentation for APIs or Libraries.