dotnet / dotnet/docfx

[Feature Request] Show parameter default values

Open
#9,626 0 comments 2 reactions 0 assignees View on GitHub
dotnet
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**Is your feature request related to a problem? Please describe.**
I see a page generated for a C# class method with its parameters. The page has the full method signature and a separate list of parameters with their name, type and description. The default value of the parameters is not easily visible. The full signature does not wrap and must be scrolled to the right to see anything. The parameter list does not indicate a default value in any way.

**Describe the solution you'd like**
The list of method parameters should also include the default value so that it's easily visible what parameters are required and what happens if some are left out when calling a method.

**Describe alternatives you've considered**
I couldn't find anything about this in the documentation or issue tracker.

Repeating each parameter's default value in the documentation comment is not maintainable and likely to get out of sync. It should better be automated.

Alternatively, the full signature should wrap so that it can be seen without scrolling far to the right. This still has the disadvantage that it will probably wrap anywhere, still leaving it hard to read.

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.