Skip to content

Use ToDouble() instead of ToInt32() for double type variable #10347

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

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

cmkaya
Copy link
Contributor

@cmkaya cmkaya commented Aug 14, 2024

The variable num2 is of type double, but the code was using ToInt32() to convert it. This can lead to potential loss of precision or rounding errors. The method should be updated to use ToDouble() to properly handle the double type.

The variable num2 is of type double, but the code was using ToInt32() to convert it. This can lead to potential loss of precision or rounding errors. The method should be updated to use ToDouble() to properly handle the double type.
Copy link
Contributor

@cmkaya : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Contributor

Learn Build status updates of commit dec21dd:

✅ Validation status: passed

File Status Preview URL Details
docs/get-started/csharp/tutorial-console.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@cmkaya
Copy link
Contributor Author

cmkaya commented Aug 14, 2024

I noticed that the screenshot on line 407 needs to be updated. Currently, it displays the ToInt32() conversion, but it should reflect the use of ToDouble() instead, as the variable num2 is of type double.

@Court72
Copy link
Contributor

Court72 commented Aug 14, 2024

@anandmeg

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged tracking label for the PR review team label Aug 14, 2024
@anandmeg
Copy link
Collaborator

@cmkaya, thanks for the updates to help improve our docs!
#sign-off

@Court72 Court72 merged commit ca7b5c5 into MicrosoftDocs:main Sep 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants