Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# 10 nullable type "?" character display seems inconsistent in the Intellisense display of the XML documentation #60833

Closed
vsfeedback opened this issue Apr 19, 2022 · 2 comments
Assignees
Labels
Area-IDE Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality Developer Community The issue was originally reported on https://developercommunity.visualstudio.com IDE-IntelliSense Completion, Signature Help, Quick Info IntelliSense-Quick Info
Milestone

Comments

@vsfeedback
Copy link

vsfeedback commented Apr 19, 2022

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
Consider the following code snippet:

/// <summary>
/// Serializes this <see cref="ICollection"/>? object to a <see cref="string?"/>, skipping nulls.
/// </summary>
/// <param name="val">The value to process.</param>
/// <param name="separator">Optional separator.</param>
/// <returns><see cref="string?"/>.</returns>
public static string? SerializeToString(this ICollection? val, string? separator = null)
{
	if (val is null)
		return null;

With reference to the XML documentation, with cref="ICollection?"/>, Intellisense will not display the ?, which is why I put it after the <see /> block.

However, with <see cref="string?"/>, it will display the ?.

<see cref="MatchCollection?"/> won't display the ?.

Two of these examples are classes, one is an interface.

I noticed the ? won't display with generics, such as public A[]? MyFunc().


Original Comments

Feedback Bot on 4/18/2022, 05:52 AM:

(private comment, text removed)

Feedback Bot on 4/18/2022, 07:29 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 19, 2022
@sharwell
Copy link
Member

💭 I would not expect a cref to a nullable reference type to work in any situation prior to the language supporting documentation references to constructed types (dotnet/csharplang#401).

@jinujoseph jinujoseph added Developer Community The issue was originally reported on https://developercommunity.visualstudio.com IDE-IntelliSense Completion, Signature Help, Quick Info IntelliSense-Quick Info Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 19, 2022
@jinujoseph jinujoseph modified the milestones: Backlog, 17.3 Apr 19, 2022
@genlu genlu modified the milestones: 17.3, 17.4 Aug 11, 2022
@genlu genlu modified the milestones: 17.4, 17.6 Jan 11, 2023
@CyrusNajmabadi
Copy link
Member

Closing out due to lack of broader feedback on this topic.

@CyrusNajmabadi CyrusNajmabadi closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality Developer Community The issue was originally reported on https://developercommunity.visualstudio.com IDE-IntelliSense Completion, Signature Help, Quick Info IntelliSense-Quick Info
Projects
None yet
Development

No branches or pull requests

5 participants