Languages
[Edit]
EN

C# / .NET - generate array of random bytes

4 points
Created by:
Kate_C
21730

Random.NextBytes method example

Random random = new Random();

byte[] bytes = new byte[10];
random.NextBytes(bytes);
			
foreach(byte entry in bytes)
	Console.WriteLine(entry);

Output:

100
206
3
229
45
247
73
187
44
237

References

  1. Random Class - Microsoft Docs
Native Advertising
­čÜÇ
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

ÔŁĄ´ŞĆ­čĺ╗ ­čÖé

Join