Link to home
Start Free TrialLog in
Avatar of Wally779
Wally779

asked on

How can I generate random bits or bytes in C# ???

Hi,

Does anyone know how a clever way to generate random bits or bytes in C# ??? I suppose I could always use the random number generator to generate some random numbers and convert those into a BitArray and then extract the random bits from those random numbers way but I was wondering if there is neater way to do this.

Thank you very much in advance for your time and care,
Wally
SOLUTION
Avatar of catchor
catchor
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Wally779
Wally779

ASKER

I thought both solutions were excellent ideas and so I split the points to be awarded to 50% each among both experts who responded. Thank you both very much for your help.