General information
Category:
Coding, syntax and commands
Environment versions
Network:
Windows 2003 Server
Hi,
>I can not create a Conditional as a CASE, IF or similar because, YES, I have 600 different objects, each table of my system represents a new object.
>Now to make life easier, I am creating a web control that allows to navigate through the data (move first, move last, delete, new, etc).
>
>
>I need to recover the object from the session in the web control:
>
>
>Xtype myLOCALcollection;
>myLOCALcollection = (Xtype) Session["coleccion"];
>
>
>Here you can see my trouble, I don’t know at compile time, what is the type of the local collection, say, the current collection.
>
>In few words, I need to create the type Xtype at run-time and BASED on the type of the object that is saved into the session var.
I thought you just wanted to obtain a correctly cast reference to the stored session object - not create an instance of it?
Anyway I, like Martin, beleive that you have a design problem. I understand what you are trying to do but not what you intend doing thereafter. Unless your various objects exhibit a common behaviour how will any subsequent code handle them? Could you provide them all with a common interface and cast to that?
Regards,
Viv
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only