Skip to content

Inconsistent documentation on C# operators #11889

Closed

Description

@paulomorgado

The true and false operators were added to https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/index by #11860, but they are still missing on the left-side TOC of the page as well as several others.

That page is also missing the stackalloc and nameof operators.

On the other hand, https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/operator-keywords is missing default,, delegate. unchecked, checked are mentioned at the end, but should be on the TOC.

/cc @BillWagner @pkulikov

Activity

  1. pkulikov commented on Apr 19, 2019

    @pkulikov
    Contributor

    @paulomorgado thanks for sharing your observations.

    On TOC

    The TOC is being shrunk with the individual operator entries made "hidden" behind the overview article entries. That is, one wouldn't see the "% operator" entry, but if one enters "%" in the textbox above the TOC, the "Arithmetic operators" entry is shown. That said, I think every operator should be "searchable" this way in the TOC. @BillWagner would it mean that keyword operators that don't end up in any overview should be listed in the operators TOC as it is? Is it acceptable to mention one article in two different TOCs?

    On the list of operators

    It looks that current C# operators index page intends to list all the operators. Then, it should contain both stackalloc and nameof as well.

    The nameof is listed in the definition of primary expressions.

    To which section should stackalloc go?

  2. BillWagner commented on Apr 19, 2019

    @BillWagner
    Member

    Thanks for writing this @paulomorgado I'm glad you're participating in the discussion.

    There are several moving parts here. I'll notes those then address the questions.

    We're looking to trip the Language Reference section of the C# Guide by relying on the Language Specification as the complete authoritative reference. See #2840 for the background discussion. we intend this to make the reference more conversational, enhancing understanding for readers.

    As part of that, we're consolidating articles in groups based on common themes. Much of the task plan is in this project. Related to this work, we're leveraging the TOC filter to find operators better. Operators are difficult to find using search engines: the search engines view those characters as punctuation and removes them. As @pkulikov states above, we're adding the operator tokens so you can type an operator in the TOC filter, and find the correct pages.

    For the TOC: Yes, there will be fewer entries, because we're combining pages. We hope the TOC filter helps. We welcome any suggestions to make it easier to find.

    operators: Yes, the intent is that this is complete. I've added stackalloc and new to #10741 (operators that are single pages.)

  3. paulomorgado commented on Apr 23, 2019

    @paulomorgado
    ContributorAuthor

    I think it's not obvious that the filter will find something that's "not there". I would expect the filter to, well, filter what's "there".

  4. added this to the August 2019 milestone on Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions