-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Actualize snippet example for Next() Method with rest of languages #9759
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
Conversation
…sions. The example doesn't represent a description of it, which has the statement, `generate a specific number of random numbers requested by the user.`. In the current example, the number of random numbers is hard coded to 10 and doesn't read from user input.
@dotnet-policy-service agree |
This comment was marked as outdated.
This comment was marked as outdated.
Thanks for noticing and fixing the discrepancy @chuve. It might be better to keep the original code (since it's simpler) and just change the intro text. What do you think? Since the example is more about Random that about reading user input. |
That was my first thought—update the intro text. However, after I checked code snippets in other languages (C++ and VB), I concluded that it would probably be better to update the code snippet instead. I agree with you that the original code is simpler and intended to show the use case of the |
@gewarren, it seems like one of the gh actions has failed - https://github.com/dotnet/dotnet-api-docs/actions/runs/8393286204/job/23071411802?pr=9759 |
@chuve I will fix this error in #9770. It involves adding a project file and then fixing all the snippets so they compile as part of one project. Once that PR is merged, we can close/reopen this one to rerun snippets 5000. |
Learn Build status updates of commit f7a53dc: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
The example doesn't represent a description where it's embedded. The description states,
generate a specific number of random numbers requested by the user.
. However, the random numbers are hardcoded to 10 and aren't requested from user input.Summary
The page where the example is embedded: https://learn.microsoft.com/en-us/dotnet/api/system.random.next?view=net-8.0