Skip to content

Update conversions.md#1504

Closed
Bretttt wants to merge 1 commit intodotnet:draft-v8from
Bretttt:patch-1
Closed

Update conversions.md#1504
Bretttt wants to merge 1 commit intodotnet:draft-v8from
Bretttt:patch-1

Conversation

@Bretttt
Copy link

@Bretttt Bretttt commented Dec 15, 2025

Add information about built-on conversions for nint and nuint.

Add information about built-on conversions for `nint` and `nuint`.
- From `float` to `double`.

Conversions from `int`, `uint`, `long` or `ulong` to `float` and from `long` or `ulong` to `double` may cause a loss of precision, but will never cause a loss of magnitude. The other implicit numeric conversions never lose any information.
Conversions from `int`, `uint`, `nint`, `nuint`, `long`, or `ulong` to `float` and from `nint`, `nuint`, `long`, or `ulong` to `double` may cause a loss of precision, but will never cause a loss of magnitude. The other implicit numeric conversions never lose any information.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the "oxford comma" here for consistency with the preceding lines.

@Bretttt
Copy link
Author

Bretttt commented Dec 15, 2025

@dotnet-policy-service agree

@jnm2
Copy link
Contributor

jnm2 commented Dec 16, 2025

Thanks for your willingness to help! Work is already proceeding in the C# 9 branch for this feature at #1457. This PR unfortunately is targeting the C# 8 branch, and C# 8 does not support these keywords.

If you're interested in helping in other areas, https://github.com/dotnet/csharpstandard/blob/draft-v8/CONTRIBUTING.md will be a great resource to support your efforts. We appreciate your time here!

@jnm2 jnm2 closed this Dec 16, 2025
@RexJaeschke
Copy link
Contributor

@Bretttt You have posted this against draft-V8, but native-sized integers were not added until V9, which we are about to tackle starting early in 2026. In fact, we already have a Draft PR for that V9 feature, PR #1457. Please look at the changes proposed there to see if your conversion concern has already been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants