|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
checking for class type
I was wondering if there was any way of checking for an
object's class type if its user defined. Lets say for example, i have an arraylist called 'shopping bag', which contains objects of the classes: toiletry, food, magazine, etc, all user defined. Now if i want to break up that arraylist into seperate arrays or arraylists of class specific objects (eg. array of toiletries) how would i go about checking which one of the classes each object in the 'shopping bag' arraylist belongs to. -Matt noob extrordinaire --------------------------------------- PS. I'm referring to the VB.net language. |
|
#2
|
|||
|
|||
|
string type = object.GetType();
|
|
#3
|
|||
|
|||
|
Errrr.... im not sure i get it. Could you please elaborate a
little if it's not too much trouble for you. ![]() -Matt |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > checking for class type |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|