-
Notifications
You must be signed in to change notification settings - Fork 5k
Add Random.Get{Hex}String #112162
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
Add Random.Get{Hex}String #112162
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
src/libraries/System.Runtime/tests/System.Runtime.Extensions.Tests/System/Random.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime/tests/System.Runtime.Extensions.Tests/System/Random.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime/tests/System.Runtime.Extensions.Tests/System/Random.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime/tests/System.Runtime.Extensions.Tests/System/Random.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jeremy Barton <[email protected]>
…ests/System/Random.cs Co-authored-by: Jeremy Barton <[email protected]>
@stephentoub @bartonjs should we add a note to dotnet/core#9824? |
It's a small helper. We could. |
Fixes #111956
I chose not to adopt RandomNumberGenerator's much more complex GetHexString implementation and instead went with a simple wrapper for GetString. We can evaluate based on perf testing whether it'd be worthwhile to do so, but my expectation is the uses for GetHexString will involve shorter sequences where the perf differential will not huge.