Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Generating random numbers (int32) [Answered] - C#
C
C#
•
4y ago
•
32 replies
Dusty
Generating random numbers (int32) [Answered]
As you may know
Guid.NewGuid()
Guid.NewGuid()
returns a 128bit random
"number
" which is very unlikely to get duplicates of
.
I need the same behaviour for 32 bit numbers
, what
's the best way to achieve that
? To just use plain old
Random#Next()
Random#Next()
? Or use
Guid#GetHashCode()
Guid#GetHashCode()
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Thread.Sleep(int32) not working? Send Help [Answered]
C
C# / help
4y ago
random multiple numbers generator
C
C# / help
4y ago
sum of all numbers in between [Answered]
C
C# / help
4y ago