dotnet / dotnet/dotnet-api-docs

Insufficient method and member summary in API docs

Open
#9,020 3 comments 1 reaction 0 assignees View on GitHub
docs-experience Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

---
**Issue moved from MicrosoftDocs/feedback#3919**
- Please respond to @amal-stack.

---

_From @amal-stack on Friday, May 19, 2023 9:29:56 AM_

**Is your feature request related to a problem? Please describe.**
Every time I refer to the .NET API Documentation, I always find it quite frustrating that I have to click a link and go to a separate page to find out if a method is static or abstract or to find out its return type. When the site lists the methods or properties of a type, it only includes the name and a short description, not even the return type. Static, instance and abstract methods are all listed together.
For instance, the following is the list of methods for the `System.Uri` class:
![image](https://github.com/MicrosoftDocs/feedback/assets/59053078/4bcf9778-5e2c-425f-b404-cc55a978f7a4)
*From: https://learn.microsoft.com/en-us/dotnet/api/system.uri?view=net-8.0*
There is a combination of static and instance methods all listed together. There is no way I can tell which methods are static or which ones are abstract. For that, I'll have to visit the link for each method. I have to also do this to find out what type each method returns. This is extremely inconvenient. Especially when I'm trying to study a new API and also when there are static and non-static versions of the same method.

**Describe the solution you'd like**
Introduce filters to list out either all/static/instance/abstract methods. A good example of this is how Java's API docs does it:
![image](https://github.com/MicrosoftDocs/feedback/assets/59053078/a103c3b2-38a2-47c8-bf6d-23c1767d2b37)
*From: https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/stream/Stream.html*
As seen in the image, I can easily view only static, instance, abstract methods. Moreover, it can be observed that the modifiers and return types are also specified for each method in the summary table.

**Describe alternatives you've considered**
A possible alternative would be to introduce an additional section for static methods as done by Dart's API docs:
![image](https://github.com/MicrosoftDocs/feedback/assets/59053078/d551f888-6b94-48a8-a962-3df94b803ac9)
*From: https://api.dart.dev/stable/3.0.1/dart-core/int-class.html*
Also, note the specification of modifiers via labels like `override`. The return type is also specified here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.