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

Update XML docs for IntPtr and UIntPtr #69614

Closed
Neme12 opened this issue May 20, 2022 · 5 comments · Fixed by dotnet/dotnet-api-docs#8132
Closed

Update XML docs for IntPtr and UIntPtr #69614

Neme12 opened this issue May 20, 2022 · 5 comments · Fixed by dotnet/dotnet-api-docs#8132
Assignees
Labels
area-System.Numerics documentation Documentation bug or enhancement, does not impact product or test code

Comments

@Neme12
Copy link

Neme12 commented May 20, 2022

The XML docs summary for IntPtr and UIntPtr currently says:

A platform-specific type that is used to represent a pointer or a handle.

This is also shown in the IDE when hovering over nint and nuint:
image
image

Now that the C# native integer types are being unified with IntPtr and UIntPtr, I think their docs should be updated to mention that they're also used to represent native integer types in general, and it's not just for pointers and handles. Maybe something like this:

Int32 currently: "Represents a 32-bit signed integer."
IntPtr could be: "Represents a native word-sized signed integer. Often used to represent a pointer or a handle."
or "Represents a platform-specific signed integer. Often..."

UInt32 currently: "Represents a 32-bit unsigned integer."
UIntPtr could be: "Represents a native word-sized unsigned integer. Often used to represent a pointer or a handle."
or "Represents a platform-specific unsigned integer. Often..."

As opposed to "Often used", maybe it could say something like "Formerly, this has been used to represent a pointer or a handle." or somehow mention that it's especially been this way historically.

I noticed this in dotnet/roslyn#61431
@jcouv @tannergooding

@ghost ghost added the untriaged New issue has not been triaged by the area owner label May 20, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@tannergooding
Copy link
Member

I'll be updating this alongside a PR I'm working on once the official build is finished and I can consume the new language functionality.

Based on past build times, I should have bits within the hour.

@tannergooding tannergooding self-assigned this May 20, 2022
@tannergooding tannergooding added area-System.Numerics documentation Documentation bug or enhancement, does not impact product or test code and removed untriaged New issue has not been triaged by the area owner labels May 20, 2022
@Neme12
Copy link
Author

Neme12 commented May 20, 2022

This also applies to the constructors and other members like Size and probably others. Basically everywhere where it just says "pointer", it should primarily say "integer" and "pointer" maybe optionally in addition to that.

@ghost
Copy link

ghost commented May 20, 2022

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Issue Details

The XML docs summary for IntPtr and UIntPtr currently says:

A platform-specific type that is used to represent a pointer or a handle.

This is also shown in the IDE when hovering over nint and nuint:
image
image

Now that the C# native integer types are being unified with IntPtr and UIntPtr, I think their docs should be updated to mention that they're also used to represent native integer types in general, and it's not just for pointers and handles. Maybe something like this:

Int32 currently: "Represents a 32-bit signed integer."
IntPtr could be: "Represents a native word-sized signed integer. Often used to represent a pointer or a handle."
or "Represents a platform-specific signed integer. Often..."

UInt32 currently: "Represents a 32-bit unsigned integer."
UIntPtr could be: "Represents a native word-sized unsigned integer. Often used to represent a pointer or a handle."
or "Represents a platform-specific unsigned integer. Often..."

As opposed to "Often used", maybe it could say something like "Formerly, this has been used to represent a pointer or a handle." or somehow mention that it's especially been this way historically.

I noticed this in dotnet/roslyn#61431
@jcouv @tannergooding

Author: Neme12
Assignees: tannergooding
Labels:

area-System.Numerics, untriaged

Milestone: -

@tannergooding
Copy link
Member

This is being handled by dotnet/dotnet-api-docs#8132

@ghost ghost locked as resolved and limited conversation to collaborators Jul 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Numerics documentation Documentation bug or enhancement, does not impact product or test code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants