1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

vb .NET comparing labels ?

Discussion in 'Software Development' started by Sysco, Jan 28, 2007.

Thread Status:
Not open for further replies.
  1. Sysco

    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
     
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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/539236

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice