Solved

Vb.Net Random / Byte

Posted on 2013-06-18
1
514 Views
Last Modified: 2013-06-18
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)
0
Comment
Question by:rflorencio
1 Comment
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 39255879
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now