Solved

Vb.Net Random / Byte

Posted on 2013-06-18
1
507 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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

9 Experts available now in Live!

Get 1:1 Help Now