Conversation
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. |
There was a problem hiding this comment.
Added the "oxford comma" here for consistency with the preceding lines.
|
@dotnet-policy-service agree |
|
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! |
|
@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. |
Add information about built-on conversions for
nintandnuint.