473,466 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

using random num gen to create number and lookup

I have a number generator between 1 and 96 that puts a number into Label12.text. several number that are generated refer to one single answer. (See code below) is there a way to do this without all of the "or"s

If Label2.Text = "1" or "14" or "17" or "20" or "26" or "28" or "40" or "51" or "58" or "61" or "66" Then

Label1.Text = messageString12 + messageString1 + messageString3 + messageString6

Thanks for your help
Oct 9 '10 #1
0 1533

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Vandana Rola | last post by:
Hi Everyone, Description: I have created flash cards using html layers, jpegs, and javascript. The way I designed it is, I have words and their descriptions (meaning) as jpeg files. Each word...
2
by: TheTamdino | last post by:
Hello all, I've tried to work this one out myself, but appearantly my brain is just a little wacked right now and I need some feedback. I'm trying to design a genealogy database (mainly...
1
by: FX | last post by:
Hi all, How can I get a random long number ? (nb: Random class allows me to generate only int number, I would like number possibly greater than int.MaxValue)
21
by: chico_yallin | last post by:
I just wana make a random id number based on4 digits-for examples?? Thanks in Advance Ch.Yallin
2
by: carrot | last post by:
The question is : Write an application that creates and prints a random phone number of the form XXX-XXX-XXXX. Include the dashes in the output. Do not let the first three digits contain an 8 or 9...
2
by: blazzer | last post by:
Hi, I need help. I just wondering whether i can set the double value using random class..i even use if statement to set it..but nothing..i wanna set between 0.5 n 0.7 value.. double planetMass...
16
by: raylopez99 | last post by:
For the public record. RL public void IterateOne() { Random myRandom = new Random(); //declare Random outside the iteration for (int j = 0; j < Max; j++) {
3
by: ismailc | last post by:
Hi, I need help! On my page I have no connection to the db, how do I create a lookup to point to a DB where I specify a query and result to my dropdown. Regards
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.