Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
OOOOOKKKK. I have ALOT of things i wont to put into an array *I'll do the man power so help me with this unless there IS a better way to do it*. I wont to assign each entry in the array with several valuse like a 3 letter/# code. I also wont to beable to have like an active and non active setting like when i program starts all entrys have a valuse of used false, so its in listbox2, but if the user selects an entry in listbox2 and presses button1 it will set that entry to used=true and move it to listbox1. I hope i expliained it well enough :p give me your ideas
  • *Experts*
Posted
If im understanding you right you could have a class or a structure with two values, one for the code and another code with the boolean value and then put each of them in an array.
Posted

i dont understand what that means but i can figure out what it does but heres an example of what i'm looking to do:::::::

 

#1-

pants -

active = false

color = blue

code = kij

 

#2-

shorts -

active = false

color = pink

code = bja

 

#3-

socks -

active = false

color = white

code = soc

I wont to pu the shorts, socks, and pants in an array but have their values still be pressent and active for them. So i could do like.

 

if bja.active = true then

listbox1.show = false

listbox2.show = true

textbox1.text = bja.code

textbox1.color = bja.color

 

 

*something like that:confused:

  • *Experts*
Posted

So you could do this:

Public Class SomeClass
Public active As Boolean
Public color as Color
Public code as string
End class

Or with a structure:

Public Structure SomeStruct
Dim active As Boolean
Dim color as Color
Dim code as string
End Structure

Then you could declare your object as one of those and then put it into an array.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...