vb .NET comparing labels ?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Sysco

Thread Starter
Joined
Apr 13, 2005
Messages
75
Hello all,

I'm learning vb.net and so got stuck at this part where I have to compare labels but don't want to end up with so many IF statements and was wondering if there is a quicker and easier way.

What I want to do is compare 40 labels (label.text) to each other and see if any one of those is the same as any other of the 40. (the 40 labels had a random number generated in each so I want to make sure none of the labels is the same as the other from the group of 40)

I could do If label1.text = label2.text or label3.text or label4.text .... etc etc but as you can see this would end up as a huge pile of probably unnecessary code, so if anyone has any suggestions on how to handle this I would be pleased to know :D

cheers
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top