Vb.Net Random / Byte

I think the following code fills the elements of a specified array of bytes with random numbers. I would like to ask the following:

- Numbers generated are integer and between 0 and 255?

Dim rnd As New Random()
Dim b(15) As Byte
rnd.NextBytes(b)
rflorencioAsked:
Who is Participating?
 
Meir RivkinConnect With a Mentor Full stack Software EngineerCommented:
byte are from 0 to 255, so u don't need to do anything special to limit this range.
u can set the array any size u want, u would never get integer not in the range 0 - 255.
0
All Courses

From novice to tech pro — start learning today.